function _getNewsArticleVersion() {
var t = /NewsArticle\/([\d\.]*)/i.exec(navigator.userAgent);
return t ? t[1] : "";
}

function _getAndroidVersion() {
var t = /android ([0-9\.]*)/i.exec(navigator.userAgent);
return t ? t[1] : "";
}

function _getIOSVersion() {
var t = /iPhone OS ([0-9_]*)/i.exec(navigator.userAgent);
return t ? t[1].replace(/_/g, ".") : "";
}

function _isNewsArticleVersionNoLessThan(t) {
var e = client.newsArticleVersion;
return e ? (t = t.split(".").slice(0, 3), e = +e.split(".").slice(0, t.length).join(""), 
e >= +t.join("")) : !1;
}

function hash2string(t) {
var e = "#";
for (var a in t) e += a + "=" + t[a] + "&";
return "&" == e.substr(-1) ? e = e.slice(0, -1) : "#" == e.substr(-1) && (e = ""), 
e;
}

function formatCount(t, e, a) {
var n = "";
if ("number" != typeof e || 0 === e) n = a || "赞"; else if (1e4 > e) n = e; else if (1e8 > e) {
var i = (Math.floor(e / 1e3) / 10).toFixed(1);
n = (i.indexOf(".0") > -1 || i >= 10 ? i.slice(0, -2) : i) + "万";
} else {
var i = (Math.floor(e / 1e7) / 10).toFixed(1);
n = (i.indexOf(".0") > -1 || i >= 10 ? i.slice(0, -2) : i) + "亿";
}
return t && $(t).each(function() {
$(this).attr("realnum", e).html(n);
}), n;
}

function commentTimeFormat(t) {
var e, a = new Date(), n = "";
try {
if (e = new Date(1e3 * t), isNaN(e.getTime())) throw new Error("Invalid Date");
} catch (i) {
return "";
}
return n += e.getFullYear() < a.getFullYear() ? e.getFullYear() + "-" : "", n += e.getMonth() >= 9 ? e.getMonth() + 1 : "0" + (e.getMonth() + 1), 
n += "-", n += e.getDate() > 9 ? e.getDate() : "0" + e.getDate(), n += " ", n += e.getHours() > 9 ? e.getHours() : "0" + e.getHours(), 
n += ":", n += e.getMinutes() > 9 ? e.getMinutes() : "0" + e.getMinutes();
}

function formatDuration(t) {
if (isNaN(Number(t))) return "00:00";
var e = [ Math.floor(t / 60), ":", Math.ceil(t % 60) ];
return e[2] <= 9 && e.splice(2, 0, 0), e[0] <= 9 && e.unshift(0), e.join("");
}

function formatTime(t) {
var e = 6e4, a = 60 * e, n = new Date(), i = n.getTime(), o = new Date(n.getFullYear(), n.getMonth(), n.getDate()), r = new Date(+t);
if (isNaN(r.getTime())) return "";
var s = i - t;
if (0 > s) return "";
if (e > s) return "刚刚";
if (a > s) return Math.floor(s / e) + "分钟前";
if (24 * a > s) return Math.floor(s / a) + "小时前";
for (var l = (r.getHours() > 9 ? r.getHours() : "0" + r.getHours()) + ":" + (r.getMinutes() > 9 ? r.getMinutes() : "0" + r.getMinutes()), c = 0; c++ <= 8; ) if (o.setDate(o.getDate() - 1), 
t > o.getTime()) return 1 === c ? "昨天 " + l : 2 === c ? "前天 " + l : c + "天前";
return (r.getFullYear() < n.getFullYear() ? r.getFullYear() + "年" : "") + (r.getMonth() + 1) + "月" + r.getDate() + "日";
}

function send_umeng_event(t, e, a) {
var n = "bytedance://" + event_type + "?category=umeng&tag=" + t + "&label=" + e;
if (a) for (var i in a) {
var o = a[i];
if ("extra" === i && "object" == typeof o) if (client.isAndroid) n += "&extra=" + JSON.stringify(o); else {
var r = "";
for (var s in o) r += "object" == typeof o[s] ? "&" + s + "=" + JSON.stringify(o[s]) : "&" + s + "=" + o[s];
n += r;
} else n += "&" + i + "=" + o;
}
try {
window.webkit.messageHandlers.observe.postMessage(n);
} catch (l) {
console.log(n);
}
}

function send_request(t, e) {
var a = "bytedance://" + t;
if (e) {
a += "?";
for (var n in e) a += n + "=" + e[n] + "&";
a = a.slice(0, -1);
}
location.href = a;
}

function send_exposure_event_once(t, e, a) {
function n() {
o && clearTimeout(o), o = setTimeout(function() {
var a = i(t, r);
console.info(a, t), a && (e(), document.removeEventListener("scroll", n, !1));
}, 50);
}
function i(t, e) {
var n = t.getBoundingClientRect(), i = n.top, o = n.height || n.bottom - n.top, r = i;
return a && (r = i + o), e > r;
}
if (t && "function" == typeof e) {
var o = 0, r = window.innerHeight;
i(t, r) ? e() : document.addEventListener("scroll", n, !1);
}
}

function isElementInViewportY(t, e) {
var a = t.getBoundingClientRect(), n = window.innerHeight || document.body.clientHeight;
return e ? a.height < n ? a.top > 0 && a.top < n && a.bottom > 0 && a.bottom < n : a.top < 0 && a.bottom > n : a.top < n && a.bottom > 0;
}

function sendUmengWhenTargetShown(t, e, a, n, i) {
t && (isElementInViewportY(t, i) ? send_umeng_event(e, a, n) : imprProcessQueue.push(arguments));
}

function wendaCacheAdd(t) {
WendaCacheUmeng.push(t);
}

function wendaCacheRemove() {
var t, e;
for (t = 0, e = WendaCacheUmeng.length; e > t; t++) "function" == typeof WendaCacheUmeng[t] && WendaCacheUmeng[t]();
WendaCacheUmeng = [];
}

function buildServerVIcon(t, e) {
var a = Page.h5_settings.user_verify_info_conf["" + t];
if (!a) return "";
if (a = a[e], !a) return "";
var e = a.icon;
return e = client.isIOS ? a.web_icon_ios : client.isSeniorAndroid ? a.web_icon_android : a.icon_png, 
'<i class="server-v-icon" style="background-image: url(' + e + ');">&nbsp;</i>';
}

function buildServerVIcon2(t, e) {
var a = Page.h5_settings.user_verify_info_conf["" + t];
if (!a) return "";
if (a = a[e], !a) return "";
var e = a.icon;
return e = client.isIOS ? a.web_icon_ios : client.isSeniorAndroid ? a.web_icon_android : a.icon_png, 
'<div class="server-v-icon-wrap"><i class="server-v-icon" style="background-image: url(' + e + ');">&nbsp;</i></div>';
}

function trans_v_info(t) {
var e = {};
if (Array.isArray(t.type_config)) for (var a = 0; a < t.type_config.length; a++) {
var n = t.type_config[a];
e[n.type] = n;
}
return e;
}

function buildPage(t) {
function e() {
var e = t.h5_extra, a = {
font_size: e.font_size || "m",
image_type: e.image_type || "thumb",
is_daymode: !!e.is_daymode,
use_lazyload: !!e.use_lazyload,
url_prefix: e.url_prefix || "content://com.ss.android.article.base.ImageProvider/"
};
return a;
}
function a() {
var t = {
font_size: getMeta("font_size") || "m",
image_type: getMeta("load_image") || "thumb",
is_daymode: getMeta("night_mode") ? !1 : !0,
use_lazyload: "undefined" == typeof close_lazyload ? !0 : !1,
url_prefix: "undefined" == typeof url_prefix ? "content://com.ss.android.article.base.ImageProvider/" : url_prefix
};
return t;
}
function n() {
var t = {
font_size: hash("tt_font") || "m",
image_type: hash("tt_image") || "thumb",
is_daymode: "1" == hash("tt_daymode"),
use_lazyload: !!parseInt(getMeta("lazy_load")),
url_prefix: "undefined" == typeof url_prefix ? "content://com.ss.android.article.base.ImageProvider/" : url_prefix
};
return t;
}
var i = {
v55: {
android: a(),
ios: n()
},
v60: {
ios: e(),
android: e()
}
}, o = {
article: {},
author: {},
tags: [],
h5_settings: {},
statistics: {},
pageSettings: {}
}, r = {
getArticleType: function() {
var e = "zhuanma";
if ("object" == typeof t.wenda_extra) e = "wenda"; else if ("object" == typeof t.forum_extra) e = "forum"; else if ("object" == typeof t.h5_extra) {
var a = t.h5_extra.media;
"object" == typeof a && null !== a && 0 != a.id && (e = "pgc");
}
return e;
},
wenda: function() {
var e = t.wenda_extra, a = e.user || {};
t.wenda_extra.title = _.escape(t.wenda_extra.title), o.article = {
title: e.title,
publishTime: e.show_time
}, o.author = {
userId: a.user_id,
name: a.user_name,
link: o.h5_settings.is_liteapp ? "javascript:;" : a.schema,
intro: a.user_intro,
avatar: a.user_profile_image_url,
isAuthorSelf: !1,
verifiedContent: a.is_verify ? "PLACE_HOLDER" : "",
medals: a.medals
};
var n = {
auth_type: "",
auth_info: ""
};
try {
n = JSON.parse(a.user_auth_info);
} catch (i) {}
o.author.auth_type = a.user_auth_info ? n.auth_type || 0 : "", o.author.auth_info = n.auth_info, 
"is_following" in e && (o.author.followState = e.is_following ? "following" : ""), 
o.wenda_extra = e, o.wenda_extra.aniok = client.isSeniorAndroid;
},
forum: function() {
var e = t.forum_extra, a = e.user_info || {};
e.forum_info || {}, o.article = {
title: e.thread_title || "",
publishTime: formatTime(1e3 * e.publish_timestamp)
}, o.author = {
userId: a.id,
name: a.name,
link: a.schema,
avatar: a.avatar_url,
isAuthorSelf: !!e.is_author,
verifiedContent: a.verified_content,
medals: a.medals
};
var n = {
auth_type: "",
auth_info: ""
};
try {
n = JSON.parse(a.user_auth_info);
} catch (i) {}
o.author.auth_type = a.user_auth_info ? n.auth_type || "0" : "", o.author.auth_info = n.auth_info, 
"is_following" in e && (o.author.followState = e.is_following ? "following" : "");
var r = [];
"object" == typeof a.media && a.media.name && r.push(a.media.name), a.verified_content && r.push(a.verified_content), 
o.author.intro = r.join("，"), o.tags = e.label_list, o.forum_extra = e, o.forumStatisticsParams = {
value: e.thread_id,
ext_value: e.forum_id,
extra: {
enter_from: e.enter_from,
concern_id: e.concern_id,
refer: e.refer,
group_type: e.group_type,
category_id: e.category_id
}
};
},
pgc: function() {
var e = t.h5_extra, a = e.media || {};
o.article = {
title: e.title,
publishTime: e.publish_stamp ? formatTime(1e3 * e.publish_stamp) : e.publish_time
}, o.author = {
userId: e.media_user_id,
mediaId: a.id,
name: a.name,
link: "sslocal://profile?refer=all&source=article_top_author&uid=" + e.media_user_id,
intro: a.description,
avatar: a.avatar_url,
isAuthorSelf: !!e.is_author
}, (o.h5_settings.is_liteapp || !e.media_user_id) && (o.author.link = "bytedance://media_account?refer=all&media_id=" + a.id + "&loc=0&entry_id=" + a.id);
var n = {
auth_type: "",
auth_info: ""
};
try {
n = JSON.parse(a.user_auth_info);
} catch (i) {}
o.author.auth_type = a.user_auth_info ? n.auth_type || 0 : "", o.author.auth_info = n.auth_info, 
o.author.verifiedContent = a.user_verified && o.author.auth_info || "", "is_subscribed" in e && (o.author.followState = e.is_subscribed ? "following" : ""), 
e.is_original && o.tags.push("原创");
},
zhuanma: function() {
var e = t.h5_extra;
o.article = {
title: e.title,
publishTime: e.publish_time || "0000-00-00 00:00"
}, o.author.name = e.source;
},
common: function() {
var e = t.h5_extra;
if ("custom_style" in t && (o.customStyle = t.custom_style), "novel_data" in e) if ("object" == typeof e.novel_data) o.novel_data = e.novel_data; else if ("string" == typeof e.novel_data) try {
o.novel_data = JSON.parse(e.novel_data);
} catch (a) {}
var n = e.ab_client || [];
o.topbuttonType = "pgc" !== o.article.type || n.indexOf("f7") > -1 ? "concern" : "digg";
try {
o.h5_settings = "object" == typeof e.h5_settings ? e.h5_settings : JSON.parse(e.h5_settings);
} catch (a) {
o.h5_settings = {};
}
if (o.h5_settings.pgc_over_head = !!o.h5_settings.pgc_over_head && "pgc" === o.article.type, 
o.h5_settings.is_liteapp = !!e.is_lite, o.h5_settings.user_verify_info_conf) {
if ("string" == typeof o.h5_settings.user_verify_info_conf) try {
o.h5_settings.user_verify_info_conf = JSON.parse(o.h5_settings.user_verify_info_conf);
} catch (a) {
o.h5_settings.user_verify_info_conf = {};
}
o.h5_settings.user_verify_info_conf = trans_v_info(o.h5_settings.user_verify_info_conf), 
o.useServerV = !0;
} else o.useServerV = !1;
o.hasExtraSpace = !o.h5_settings.is_liteapp && client.isSeniorAndroid, o.hideFollowButton = !!e.hideFollowButton, 
o.statistics = {
group_id: e.str_group_id || e.group_id || "",
item_id: e.str_item_id || e.item_id || ""
};
}
};
"object" != typeof t && (t = window);
var s = r.getArticleType();
return o.article.type = s, r.common(), window.OldPage && (o.hasExtraSpace = OldPage.hasExtraSpace), 
r[s](), o.pageSettings = i[APP_VERSION][CLIENT_VERSION], o.article.type = s, o;
}

function buildHeader(t) {
var e = renderHeader({
data: t
}), a = $("header");
a.length <= 0 ? $(document.body).prepend(e) : a.replaceWith(e);
}

function buildArticle(t) {
document.body.classList.add(Page.article.type), document.body.classList.add(CLIENT_VERSION), 
document.body.classList.add(APP_VERSION), Page.h5_settings.pic_top_grid && document.body.classList.add("lite-wide-image"), 
"string" == typeof t && $("article").html(t), "wenda" === Page.article.type && processWendaArticle(), 
"forum" === Page.article.type && processForumArticle2();
}

function buildFooter(t) {
var e = renderFooter({
data: t
}), a = $("footer");
a.length > 0 ? a.replaceWith(e) : $(document.body).append(e);
}

function processWendaArticle() {
var t, e = Page.wenda_extra, a = e.show_post_answer_strategy || {}, n = e.wd_version || 0, i = Page.h5_settings.is_liteapp, o = "show_top" in a && !i, r = "show_default" in a && !i, s = {
value: e.qid,
ext_value: e.nice_ans_count,
extra: {
enter_from: e.enter_from,
ansid: e.ansid,
parent_enterfrom: e.parent_enterfrom || ""
}
};
if (window.assignThroughWendaNiceanscount = function(t) {
s.ext_value = t;
}, 1 > n || n >= 3 && 1 == e.showMode) $("header").find(".tt-title").remove(); else {
t = $(o ? '<div class="wt">' + e.title + '</div><div class="ft"><span class="see-all-answers" id="total-answer-count"></span><span class="hide-placeholder">&nbsp;</span></div><a class="big-answer-buttoon go-to-answer" href="' + a.show_top.schema + '">' + a.show_top.text + '</a><div class="big-answer-buttoon-gap"></div>' : r ? '<div class="wt">' + e.title + '</div><div class="ft"><a class="go-to-answer go-to-answer-small" href="' + a.show_default.schema + '">回答</a><span class="see-all-answers" id="total-answer-count"></span></div>' : '<div class="wt">' + e.title + '</div><div class="ft"><span class="see-all-answers" id="total-answer-count"></span><span class="hide-placeholder">&nbsp;</span></div>');
var l = o ? "bigans" : r ? "smlans" : "noans";
if ($("header").find(".tt-title").removeClass("tt-title").addClass("wenda-title " + l + " title-type" + (e.answer_detail_type || 0)).html(t).on("click", function() {
return "wenda_title_handle" in e && e.wenda_title_handle ? void (ToutiaoJSBridge && ToutiaoJSBridge.call("clickWendaDetailHeader")) : void ("need_return" in e ? e.need_return ? ToutiaoJSBridge && ToutiaoJSBridge.call("close") : window.location.href = e.list_schema : [ "click_answer", "click_answer_fold" ].indexOf(e.enter_from) > -1 ? ToutiaoJSBridge && ToutiaoJSBridge.call("close") : window.location.href = e.list_schema);
}), new PressState({
bindSelector: ".wenda-title,.big-answer-buttoon",
exceptSelector: ".go-to-answer-small,.see-all-answers",
pressedClass: "pressing",
removeLatency: 500
}), o ? (send_umeng_event("answer_detail", "top_write_answer_show", s), $(".go-to-answer").on("click", function(t) {
t.stopPropagation(), send_umeng_event("answer_detail", "top_write_answer", s);
})) : r && (window.wenda_extra && window.wenda_extra.answer_detail_type ? wendaCacheAdd(function() {
send_umeng_event("answer_detail", "wirte_answer_show", s);
}) : send_umeng_event("answer_detail", "wirte_answer_show", s), $(".go-to-answer").on("click", function(t) {
t.stopPropagation(), send_umeng_event("answer_detail", "wirte_answer", s);
})), "show_bottom" in a && $("article").height() > 2 * window.innerHeight && !i) {
var c = $('<a href="' + a.show_bottom.schema + '" class="bottom-big-answer-button"><div class="pr"><div class="wdq"><span>' + e.title + '</span></div><div class="bottom-answer-btn"><i>&#xe645;</i>' + a.show_bottom.text + '</div><i class="left-quote" >&#xe619;</i><i class="right-quote" >&#xe618;</i></div></a>');
setTimeout(function() {
$("footer").append(c).css({
overflow: "initial"
}), c.on("click", function() {
send_umeng_event("answer_detail", "bottom_write_answer", s);
}), send_exposure_event_once(c.get(0), function() {
send_umeng_event("answer_detail", "bottom_write_answer_show", s);
}, !0);
}, 500);
}
}
$("#wenda_index_link").on("click", function() {
[ "click_answer", "click_answer_fold" ].indexOf(e.enter_from) > -1 ? ToutiaoJSBridge.call("close") : location.href = e.list_schema;
});
}

function buildUIStyle(settings) {
if ("forum" !== Page.article.type && settings.font_size_ui_test) {
if (1 !== settings.font_size_ui_test && 2 !== settings.font_size_ui_test && 3 !== settings.font_size_ui_test) return;
var CustomStyleTemplateFunction = function(obj) {
var __p = "";
with (Array.prototype.join, obj || {}) __p += "", "1" == plane ? (__p += ".font_s article p, .font_s article h1, .font_s article h2, .font_s article h3, .font_s article h4, .font_s article h5, .font_s article h6, .font_s article ul, .font_s article ol, .font_s article hr, .font_s article .image-wrap {margin-top: 18px;margin-bottom: 18px;}article p, article h1, article h2, article h3, article h4, article h5, article h6, article blockquote, article ul, article ol, article hr, .font_m article p, .font_m article h1, .font_m article h2, .font_m article h3, .font_m article h4, .font_m article h5, .font_m article h6, .font_m article ul, .font_m article ol, .font_m article hr, .font_m article .image-wrap {margin-top: 20px;margin-bottom: 20px;}.font_l article p, .font_l article h1, .font_l article h2, .font_l article h3, .font_l article h4, .font_l article h5, .font_l article h6, .font_l article ul, .font_l article ol, .font_l article hr, .font_s article .image-wrap {margin-top: 22px;margin-bottom: 22px;}.font_xl article p, .font_xl article h1, .font_xl article h2, .font_xl article h3, .font_xl article h4, .font_xl article h5, .font_xl article h6, .font_xl article ul, .font_xl article ol, .font_xl article hr, .font_s article .image-wrap {margin-top: 25px;margin-bottom: 25px;}", 
client.isIOS && (__p += "@media(max-device-width: 374px){.font_s article p, .font_s article h1, .font_s article h2, .font_s article h3, .font_s article h4, .font_s article h5, .font_s article h6, .font_s article ul, .font_s article ol, .font_s article hr, .font_s article .image-wrap {margin-top: 16px;margin-bottom: 16px;}article p, article h1, article h2, article h3, article h4, article h5, article h6, article blockquote, article ul, article ol, article hr, .font_m article p, .font_m article h1, .font_m article h2, .font_m article h3, .font_m article h4, .font_m article h5, .font_m article h6, .font_m article ul, .font_m article ol, .font_m article hr, .font_m article .image-wrap {margin-top: 18px;margin-bottom: 18px;}.font_l article p, .font_l article h1, .font_l article h2, .font_l article h3, .font_l article h4, .font_l article h5, .font_l article h6, .font_l article ul, .font_l article ol, .font_l article hr, .font_s article .image-wrap {margin-top: 20px;margin-bottom: 20px;}.font_xl article p, .font_xl article h1, .font_xl article h2, .font_xl article h3, .font_xl article h4, .font_xl article h5, .font_xl article h6, .font_xl article ul, .font_xl article ol, .font_xl article hr, .font_s article .image-wrap {margin-top: 23px;margin-bottom: 23px;}}"), 
__p += "") : "2" == plane ? (__p += "", __p += client.isIOS ? ".font_s article, .font_s article h1, .font_s article h2, .font_s article h3, .font_s article h4, .font_s article h5, .font_s article h6 {line-height: 28px;}article, article h1, article h2, article h3, article h4, article h5, article h6, .font_m article, .font_m article h1, .font_m article h2, .font_m article h3, .font_m article h4, .font_m article h5, .font_m article h6 {line-height: 30px;}.font_l article, .font_l article h1, .font_l article h2, .font_l article h3, .font_l article h4, .font_l article h5, .font_l article h6 {line-height: 32px;}.font_xl article, .font_xl article h1, .font_xl article h2, .font_xl article h3, .font_xl article h4, .font_xl article h5, .font_xl article h6 {line-height: 35px;}@media(max-device-width: 374px){.font_s article, .font_s article h1, .font_s article h2, .font_s article h3, .font_s article h4, .font_s article h5, .font_s article h6 {line-height: 23px;}article, article h1, article h2, article h3, article h4, article h5, article h6, .font_m article, .font_m article h1, .font_m article h2, .font_m article h3, .font_m article h4, .font_m article h5, .font_m article h6 {line-height: 25px;}.font_l article, .font_l article h1, .font_l article h2, .font_l article h3, .font_l article h4, .font_l article h5, .font_l article h6 {line-height: 27px;}.font_xl article, .font_xl article h1, .font_xl article h2, .font_xl article h3, .font_xl article h4, .font_xl article h5, .font_xl article h6 {line-height: 30px;}}" : ".font_s article, .font_s article h1, .font_s article h2, .font_s article h3, .font_s article h4, .font_s article h5, .font_s article h6 {line-height: 26px;}article, article h1, article h2, article h3, article h4, article h5, article h6, .font_m article, .font_m article h1, .font_m article h2, .font_m article h3, .font_m article h4, .font_m article h5, .font_m article h6 {line-height: 28px;}.font_l article, .font_l article h1, .font_l article h2, .font_l article h3, .font_l article h4, .font_l article h5, .font_l article h6 {line-height: 30px;}.font_xl article, .font_xl article h1, .font_xl article h2, .font_xl article h3, .font_xl article h4, .font_xl article h5, .font_xl article h6 {line-height: 33px;}", 
__p += "") : "3" == plane && (__p += "", __p += client.isIOS ? ".font_s article, .font_s article h1, .font_s article h2, .font_s article h3, .font_s article h4, .font_s article h5, .font_s article h6 {line-height: 28px;}article, article h1, article h2, article h3, article h4, article h5, article h6, .font_m article, .font_m article h1, .font_m article h2, .font_m article h3, .font_m article h4, .font_m article h5, .font_m article h6 {line-height: 30px;}.font_l article, .font_l article h1, .font_l article h2, .font_l article h3, .font_l article h4, .font_l article h5, .font_l article h6 {line-height: 32px;}.font_xl article, .font_xl article h1, .font_xl article h2, .font_xl article h3, .font_xl article h4, .font_xl article h5, .font_xl article h6 {line-height: 35px;}.font_s article p, .font_s article h1, .font_s article h2, .font_s article h3, .font_s article h4, .font_s article h5, .font_s article h6, .font_s article ul, .font_s article ol, .font_s article hr, .font_s article .image-wrap {margin-top: 18px;margin-bottom: 18px;}article p, article h1, article h2, article h3, article h4, article h5, article h6, article blockquote, article ul, article ol, article hr, .font_m article p, .font_m article h1, .font_m article h2, .font_m article h3, .font_m article h4, .font_m article h5, .font_m article h6, .font_m article ul, .font_m article ol, .font_m article hr, .font_m article .image-wrap {margin-top: 20px;margin-bottom: 20px;}.font_l article p, .font_l article h1, .font_l article h2, .font_l article h3, .font_l article h4, .font_l article h5, .font_l article h6, .font_l article ul, .font_l article ol, .font_l article hr, .font_s article .image-wrap {margin-top: 22px;margin-bottom: 22px;}.font_xl article p, .font_xl article h1, .font_xl article h2, .font_xl article h3, .font_xl article h4, .font_xl article h5, .font_xl article h6, .font_xl article ul, .font_xl article ol, .font_xl article hr, .font_s article .image-wrap {margin-top: 25px;margin-bottom: 25px;}@media(max-device-width: 374px){.font_s article, .font_s article h1, .font_s article h2, .font_s article h3, .font_s article h4, .font_s article h5, .font_s article h6 {line-height: 23px;}article, article h1, article h2, article h3, article h4, article h5, article h6, .font_m article, .font_m article h1, .font_m article h2, .font_m article h3, .font_m article h4, .font_m article h5, .font_m article h6 {line-height: 25px;}.font_l article, .font_l article h1, .font_l article h2, .font_l article h3, .font_l article h4, .font_l article h5, .font_l article h6 {line-height: 27px;}.font_xl article, .font_xl article h1, .font_xl article h2, .font_xl article h3, .font_xl article h4, .font_xl article h5, .font_xl article h6 {line-height: 30px;}.font_s article p, .font_s article h1, .font_s article h2, .font_s article h3, .font_s article h4, .font_s article h5, .font_s article h6, .font_s article ul, .font_s article ol, .font_s article hr, .font_s article .image-wrap {margin-top: 16px;margin-bottom: 16px;}article p, article h1, article h2, article h3, article h4, article h5, article h6, article blockquote, article ul, article ol, article hr, .font_m article p, .font_m article h1, .font_m article h2, .font_m article h3, .font_m article h4, .font_m article h5, .font_m article h6, .font_m article ul, .font_m article ol, .font_m article hr, .font_m article .image-wrap {margin-top: 18px;margin-bottom: 18px;}.font_l article p, .font_l article h1, .font_l article h2, .font_l article h3, .font_l article h4, .font_l article h5, .font_l article h6, .font_l article ul, .font_l article ol, .font_l article hr, .font_s article .image-wrap {margin-top: 20px;margin-bottom: 20px;}.font_xl article p, .font_xl article h1, .font_xl article h2, .font_xl article h3, .font_xl article h4, .font_xl article h5, .font_xl article h6, .font_xl article ul, .font_xl article ol, .font_xl article hr, .font_s article .image-wrap {margin-top: 23px;margin-bottom: 23px;}}" : ".font_s article, .font_s article h1, .font_s article h2, .font_s article h3, .font_s article h4, .font_s article h5, .font_s article h6 {line-height: 26px;}article, article h1, article h2, article h3, article h4, article h5, article h6, .font_m article, .font_m article h1, .font_m article h2, .font_m article h3, .font_m article h4, .font_m article h5, .font_m article h6 {line-height: 28px;}.font_l article, .font_l article h1, .font_l article h2, .font_l article h3, .font_l article h4, .font_l article h5, .font_l article h6 {line-height: 30px;}.font_xl article, .font_xl article h1, .font_xl article h2, .font_xl article h3, .font_xl article h4, .font_xl article h5, .font_xl article h6 {line-height: 33px;}.font_s article p, .font_s article h1, .font_s article h2, .font_s article h3, .font_s article h4, .font_s article h5, .font_s article h6, .font_s article ul, .font_s article ol, .font_s article hr, .font_s article .image-wrap {margin-top: 18px;margin-bottom: 18px;}article p, article h1, article h2, article h3, article h4, article h5, article h6, article blockquote, article ul, article ol, article hr, .font_m article p, .font_m article h1, .font_m article h2, .font_m article h3, .font_m article h4, .font_m article h5, .font_m article h6, .font_m article ul, .font_m article ol, .font_m article hr, .font_m article .image-wrap {margin-top: 20px;margin-bottom: 20px;}.font_l article p, .font_l article h1, .font_l article h2, .font_l article h3, .font_l article h4, .font_l article h5, .font_l article h6, .font_l article ul, .font_l article ol, .font_l article hr, .font_s article .image-wrap {margin-top: 22px;margin-bottom: 22px;}.font_xl article p, .font_xl article h1, .font_xl article h2, .font_xl article h3, .font_xl article h4, .font_xl article h5, .font_xl article h6, .font_xl article ul, .font_xl article ol, .font_xl article hr, .font_s article .image-wrap {margin-top: 25px;margin-bottom: 25px;}", 
__p += ""), __p += "";
return __p;
}, CustomStyleTemplateString = CustomStyleTemplateFunction({
plane: settings.font_size_ui_test,
client: client
}), originStyle = document.querySelector("head").querySelectorAll("style[source=abtest]");
if (0 === originStyle.length) {
var style = document.createElement("style");
style.setAttribute("source", "abtest"), style.setAttribute("plane", "plane" + settings.font_size_ui_test), 
style.innerHTML = CustomStyleTemplateString, document.querySelector("head").appendChild(style), 
style = null;
} else for (var i = 0; i < originStyle.length; i++) {
var item = originStyle[i];
if (item.getAttribute("plane") === "plane" + settings.font_size_ui_test) return;
item.setAttribute("plane", "plane" + settings.font_size_ui_test), item.innerHTML = CustomStyleTemplateString;
}
} else $("style[source=abtest]").remove();
}

function update_forum_tags(t) {
"string" == typeof t && (t = t.split(","));
var e = $('<div class="article-tags">');
t.forEach(function(t) {
"" !== t && e.append($('<div class="article-tag">').html(t));
}), t.length >= 1 ? $(".name-link-w").removeClass("no-intro") : "" === $(".sub-title").text() && $(".name-link-w").addClass("no-intro"), 
$(".article-tags").replaceWith(e);
}

function on_page_disappear() {
mediasugScroll.pushimpr(!1);
}

function set_info(t) {
if ("string" == typeof t) t = JSON.parse(t); else if ("object" != typeof t) return;
$.extend(window.globalWendaStates, t), "is_concern_user" in t && change_following_state(!!t.is_concern_user), 
"brow_count" in t && ($(".brow-count").text(t.brow_count), formatCount(".brow-count", t.brow_count, "0")), 
"is_digg" in t && "digg_count" in t && (t.is_digg && $("#digg").attr({
"wenda-state": "digged",
aniok: "false"
}), formatCount(".digg-count", t.digg_count, "赞"), formatCount(".digg-count-special", t.digg_count, "0")), 
"is_buryed" in t && "bury_count" in t && (t.is_buryed && $("#bury").attr({
"wenda-state": "buryed",
aniok: "false"
}), formatCount(".bury-count", t.bury_count, "踩")), "is_show_bury" in t && t.is_show_bury && $("#bury").show().parent().removeClass("only-one").addClass("only-two");
}

function getElementPosition(t) {
var e = document.querySelector(t);
if (e) {
var a = e.getBoundingClientRect();
return "{{" + a.left + "," + e.offsetTop + "},{" + a.width + "," + a.height + "}}";
}
return "{{0,0},{0,0}}";
}

function setFontSize(t) {
var e = t.split("_")[0], a = (t.split("_")[1], [ "s", "m", "l", "xl" ]), n = $.map(a, function(t) {
return "font_" + t;
}).join(" ");
a.indexOf(e) > -1 && $("body").removeClass(n).addClass("font_" + e);
}

function setDayMode(t) {
var e = [ 0, 1, "0", "1" ];
e.indexOf(t) > -1 && (t = parseInt(t), $(document.body)[t ? "removeClass" : "addClass"]("night"));
}

function appCloseVideoNoticeWeb(t) {
var e = $('[data-vid="' + t + '"]');
e.each(function() {
$(this).css("display", "block"), $(this).next(".cv-wd-info-wrapper").show(), $("body").css("margin-top", "0px");
});
}

function getVideoFrame(t) {
var e = document.querySelector('[data-vid="' + t + '"]'), a = "{{0,0},{0,0}}";
if (e) {
var n = e.getBoundingClientRect();
a = "{{" + n.left + "," + e.offsetTop + "},{" + n.width + "," + n.height + "}}";
}
return a;
}

function processMenuItemPressEvent() {
ToutiaoJSBridge.call("typos", {
strings: getThreeStrings()
});
}

function getThreeStrings() {
var t = "", e = "", a = "", n = document.getSelection();
if ("Range" !== n.type) return [ t, e, a ];
var i = n.getRangeAt(0);
if (!i) return [ t, e, a ];
try {
t = i.startContainer.textContent.substring(0, i.startOffset).substr(-20), e = i.toString(), 
a = i.endContainer.textContent.substring(i.endOffset).substring(0, 20);
} catch (o) {}
return i.detach(), i = null, [ t, e, a ];
}

function updateAppreciateCountByServer() {}

function subscribe_switch(t) {
"pgc" == Page.article.type && change_following_state(!!t);
}

function _videoInView(t) {
var e = t.getBoundingClientRect(), a = e.height || 100;
return (e.top >= 0 && e.left >= 0 && e.top) <= (window.innerHeight || document.documentElement.clientHeight) - a;
}

function videoAutoPlay() {
var t = $(".custom-video");
if (!autoplayed && t.length) {
var e = t.get(0);
_videoInView(e) ? (playVideo(e, 1), autoplayed = !0) : document.addEventListener("scroll", videoAutoPlay, !1);
} else document.removeEventListener("scroll", videoAutoPlay, !1);
}

function dealNovelButton(t, e, a, n) {
t.preventDefault(), send_umeng_event("detail", e.is_concerned ? "click_fictioncard_discare" : "click_fictioncard_care", n), 
$.ajax({
url: "http://ic.snssdk.com/concern/v1/commit/" + (e.is_concerned ? "discare/" : "care/"),
dataType: "jsonp",
data: {
concern_id: e.concern_id
},
beforeSend: function() {
return e.isclicking ? !1 : void (e.isclicking = !0);
},
complete: function() {
e.isclicking = !1;
},
error: function() {
ToutiaoJSBridge.call("toast", {
text: "操作失败，请重试",
icon_type: "icon_error"
});
},
success: function(t) {
return 0 != t.err_no ? (ToutiaoJSBridge.call("toast", {
text: "操作失败，请重试",
con_type: "icon_error"
}), !1) : (e.is_concerned = !e.is_concerned, a.attr("is-concerned", Boolean(e.is_concerned)).html(e.is_concerned ? "已关注" : "关注"), 
ToutiaoJSBridge.call("page_state_change", {
type: "concern_action",
id: e.concern_id,
status: e.is_concerned ? 1 : 0
}), ToutiaoJSBridge.call("page_state_change", {
type: "forum_action",
id: e.forum_id,
status: e.is_concerned ? 1 : 0
}), void send_umeng_event(e.is_concerned ? "concern_novel" : "unconcern_novel", "detail", {
value: Page.statistics.group_id,
extra: {
item_id: Page.statistics.item_id,
novel_id: e.id
}
}));
}
});
}

function dealOptionalStockButton(t, e, a, n, i) {
t.stopPropagation(), send_umeng_event("stock", "article_add_stock", i);
var o, r = 0, s = e.attr("data-stock"), l = 0;
n.forEach(function(t, e) {
t.code == s && (l = e, o = t.market), 0 == t.selected && r++;
}), 1 != n[l].selected && $.ajax({
url: "http://ic.snssdk.com/stock/like/",
dataType: "jsonp",
data: {
code: s,
market: o
},
beforeSend: function() {
return n[l].isclicking || 1 == n[l].selected ? !1 : void (n[l].isclicking = !0);
},
complete: function() {
n[l].isclicking = !1;
},
error: function() {
ToutiaoJSBridge.call("toast", {
text: "操作失败，请重试",
icon_type: "icon_error"
});
},
success: function(t) {
return 1 != t.code ? (ToutiaoJSBridge.call("toast", {
text: 0 == t.code && t.data.msg ? t.data.msg : "操作失败，请重试",
con_type: "icon_error"
}), !1) : (a.stocks.click_mount++, "single" === e.attr("type") ? e.attr("selected", "") : (e.removeClass("pcard-w1").addClass("pcard-w3").html('<i class="pcard-icon opstock-iconfont icon-done"></i>已添加'), 
r > 3 && (e.css("height", 0), $parent = e.parent(), $parent.on("webkitAnimationEnd", function() {
$parent.remove();
}), $parent.on("animationend", function() {
$parent.remove();
}), $parent.addClass("ant-notification-fade-leave"))), void (n[l].selected = !0));
}
});
}

function wendaConetxtRender(context) {
!function() {
if ("wenda_context" in context) {
var t = context.wenda_context;
if ("is_author" in t && (t.is_author ? ($(".follow-button").hide(), $(".author-function-buttons").hide(), 
$(".wenda-info").show()) : "wenda" === Page.article.type && Page.h5_settings.is_liteapp ? ($(".follow-button").hide(), 
$(".author-function-buttons").hide(), $(".wenda-info").hide()) : ($(".author-function-buttons").show(), 
$(".follow-button").show(), $(".wenda-info").hide())), "is_author" in t && t.is_author ? ($(".wd-footer .editor-edit-answer").attr("href", t.edit_answer_schema).show(), 
$(".wd-footer .dislike-and-report").hide()) : ($(".wd-footer .editor-edit-answer").hide(), 
$(".wd-footer .dislike-and-report").show()), "is_author" in t && t.is_author || ($(".report").show(), 
$(".sep.for-report").show()), "brow_count" in t && ($(".brow-count").text(t.brow_count), 
formatCount(".brow-count", t.brow_count, "0")), "linkurl" in t && t.linkurl && $("#wd-link-more").attr("href", t.linkurl).show(), 
"is_digg" in t && "digg_count" in t && (t.is_digg && $("#digg").attr({
"wenda-state": "digged",
aniok: "false"
}), formatCount(".digg-count", t.digg_count, "赞"), formatCount(".digg-count-special", t.digg_count, "0")), 
"is_buryed" in t && "bury_count" in t && (t.is_buryed && $("#bury").attr({
"wenda-state": "buryed",
aniok: "false"
}), formatCount(".bury-count", t.bury_count, "踩"), t.is_buryed && $(".dislike-and-report").css("color", "#999999").text("已反对"), 
wenda_extra.wd_version >= 6)) {
var e = t.is_buryed;
$('[item="dislike-and-report"]').on("click", function() {
var t = this;
ToutiaoJSBridge.call("dislike", {
options: 17
}, function(a) {
0 == a.err_no && (e ? wenda_extra.wd_version >= 8 && ($(t).removeClass("is-buryed"), 
t.innerHTML = "反对", e = !e) : ($(t).addClass("is-buryed"), t.innerHTML = "已反对", 
e = !e));
});
});
}
if ("is_show_bury" in t && t.is_show_bury && $("#bury").show().parent().removeClass("only-one").addClass("only-two"), 
"is_concern_user" in t && change_following_state(!!t.is_concern_user), !("show_next" in t) || t.show_next) {
if ($(".serial").show(), "has_next" in t) {
var a = $("#next_answer_link");
t.has_next ? (a.attr("href", t.next_answer_schema), a.attr("onclick", null)) : (a.attr("onclick", null), 
a.addClass("disabled").on("click", function() {
ToutiaoJSBridge.call("toast", {
text: "这是最后一个回答",
icon_type: ""
});
}), needCleanDoms.push(a));
}
"ans_count" in t && ($("#total-answer-count").html(t.ans_count + "个回答").css("display", "inline-block"), 
$("#total-answer-count-index").html("全部" + t.ans_count + "个回答")), "nice_ans_count" in t && "wenda_extra" in window && ("function" == typeof window.assignThroughWendaNiceanscount ? window.assignThroughWendaNiceanscount(t.nice_ans_count) : window.wenda_extra.nice_ans_count = t.nice_ans_count);
}
}
}(), function() {
if ("wenda_recommend" in context && Page.wenda_extra) {
var templateFunction = function(obj) {
var __t, __p = "";
with (Array.prototype.join, obj || {}) __p += '<a class="jrwdpd" href="' + (null == (__t = data.open_url) ? "" : __t) + '"><div class="jrwdpd-slogan">' + (null == (__t = data.text) ? "" : __t) + '</div><button class="jrwdpd-button">' + (null == (__t = data.button_text) ? "" : __t) + '</button><div class="jrwdpd-logo"></div><div class="jrwdpd-logo-wrap"></div></a>';
return __p;
}, $template = $(templateFunction({
data: context.wenda_recommend
}));
$("footer").append($template), $template.on("click", function() {
send_umeng_event("wenda_channel_detail", "enter", {
extra: {
qid: Page.wenda_extra.qid,
ansid: Page.wenda_extra.ansid,
enter_from: Page.wenda_extra.enter_from,
parent_enterfrom: Page.wenda_extra.parent_enterfrom || ""
}
});
}), needCleanDoms.push($template);
}
}(), wendaCacheRemove();
}

function bindStatisticsEvents23() {
$(".subscribe-button"), $("#mediasug-list"), $(document.body).on("click", ".subscribe-button", followActionHandler), 
$(document.body).on("click", ".mediasug-arrow-button", mediasugArrowAction), $(document.body).on("click", ".ms-item", mediasugCardClickHandler), 
$(document.body).on("click", ".ms-subs", mediasugFollowAction);
}

function followActionHandler() {
var t = $(this), e = t.data("userId"), a = t.data("mediaId"), n = t.hasClass("following"), i = t.attr("data-concerntype") || "", o = Page.article.type, r = "" === i, s = Page.hasExtraSpace && r;
t.hasClass("disabled") || ($(".subscribe-button").addClass("disabled"), $("header").addClass("canmoving"), 
"pgc" === o ? (doFollowMedia(e, a, n, i), s && (n ? $("header").attr("sugstate", "no") : doRecommendUsers(Page.author.userId, recommendUsersSuccess, function() {}))) : "wenda" === o ? (doFollowUser(e, a, n, void 0, followSource.wenda), 
send_umeng_event(n ? "unfollow" : "follow", "wenda_detail", {
value: wenda_extra.ansid,
ext_value: e
}), (client.isAndroid && client.isNewsArticleVersionNoLessThan("6.2.5") || client.isIOS && client.isNewsArticleVersionNoLessThan("6.2.6")) && s && (n ? $("header").attr("sugstate", "no") : doRecommendUsers(Page.author.userId, recommendUsersSuccess, function() {}))) : "forum" === o && (doFollowUser(e, a, n, void 0, followSource.forum), 
(client.isAndroid && client.isNewsArticleVersionNoLessThan("6.2.5") || client.isIOS && client.isNewsArticleVersionNoLessThan("6.2.6")) && s && (n ? $("header").attr("sugstate", "no") : doRecommendUsers(Page.author.userId, recommendUsersSuccess, function() {}))));
}

function mediasugArrowAction() {
var t = $("header"), e = "close" === t.attr("sugstate");
t.attr("sugstate", e ? "open" : "close"), send_umeng_event("detail", e ? "click_arrow_down" : "click_arrow_up", {
extra: {
source: "article_detail"
}
});
}

function mediasugCardClickHandler(t) {
if (!$(t.target).is(".ms-subs")) {
var e = $(this).attr("it-is-user-id");
"pgc" === Page.article.type ? send_umeng_event("detail", "sub_rec_click", {
value: e,
extra: {
source: "article_detail",
profile_user_id: Page.author.userId
}
}) : "forum" === Page.article.type ? send_umeng_event("follow_card", "click_avatar", {
value: forum_extra.thread_id,
ext_value: e,
extra: {
source: "weitoutiao_detail",
profile_user_id: Page.author.userId
}
}) : "wenda" === Page.article.type && send_umeng_event("follow_card", "click_avatar", {
value: wenda_extra.ansid,
ext_value: e,
extra: {
source: "wenda_detail",
profile_user_id: Page.author.userId
}
}), window.location.href = "sslocal://profile?uid=" + e;
}
}

function mediasugFollowAction() {
var t = $(this), e = null != t.attr("isfollowing"), a = t.closest(".ms-item").attr("it-is-user-id"), n = t.attr("reason"), i = followSource[Page.article.type + "_sug"];
t.attr("disabled", !0), "wenda" === Page.article.type ? send_umeng_event(e ? "unfollow" : "follow", "wenda_detail_sug", {
ext_value: a,
value: wenda_extra.ansid,
extra: {
profile_user_id: Page.author.userId,
source: "wenda_detail"
}
}) : "forum" === Page.article.type && send_umeng_event(e ? "unfollow" : "follow", "weitoutiao_detail_sug", {
ext_value: a,
value: forum_extra.thread_id,
extra: {
profile_user_id: Page.author.userId,
source: "weitoutiao_detail"
}
}), ToutiaoJSBridge.call("user_follow_action", {
id: a,
action: e ? "unfollow" : "dofollow",
reason: n,
source: i
}, function(n) {
t.attr("disabled", null), "object" == typeof n && 1 == n.code && ("pgc" === Page.article.type && send_umeng_event("detail", e ? "sub_rec_unsubscribe" : "sub_rec_subscribe", {
value: a,
extra: {
source: "article_detail",
profile_user_id: Page.author.userId
}
}), t.attr("isfollowing", e ? null : ""), doRecommendUsers(Page.author.userId, function(t) {
if (Array.isArray(t)) for (var n = t.length, i = 0; n > i; i++) t[i].user_id == a && (t[i].is_following = !e);
}, function() {}));
});
}

function domPrepare() {
var t = document.querySelector(".mediasug-outer-container"), e = document.querySelector(".mediasug-inner-container");
if (t && e) {
t.addEventListener("transitionend", function(t) {
0 == t.target.offsetHeight && (e.style.display = "none");
}, !1);
var a = window.MutationObserver || window.WebKitMutationObserver;
if (a) {
var n = new a(function(t) {
t.forEach(function(t) {
var a = t.attributeName;
if ("sugstate" === a) {
var n = t.target.getAttribute(a);
if ("open" === n) {
e.style.display = "block", console.info("SUG-OEPN"), mediasugScroll.open(), $(document).on("scroll", mediasugScroll.pagescroll), 
ToutiaoJSBridge.on("webviewScrollEvent", function(t) {
mediasugScroll.webviewScroll(t);
});
var i, o;
"pgc" === Page.article.type ? (i = "article_detail", o = Page.statistics.group_id) : "forum" === Page.article.type ? (i = "weitoutiao_detail", 
o = forum_extra.thread_id) : "wenda" === Page.article.type && (i = "wenda_detail", 
o = wenda_extra.ansid), send_umeng_event("follow_card", "show", {
value: o,
extra: {
source: i
}
});
} else console.info("SUG-HIDE"), $(document).off("scroll", mediasugScroll.pagescroll), 
mediasugScroll.pushimpr(!0);
}
});
});
n.observe(document.getElementsByTagName("header")[0], {
attributes: !0
});
}
}
}

function recommendUsersSuccess(list) {
if (!($("header").get(0).getBoundingClientRect().bottom + 232 < 0)) {
list.forEach(function(t) {
if (t.user_auth_info && "string" == typeof t.user_auth_info) try {
t.user_auth_info = JSON.parse(t.user_auth_info);
} catch (e) {
t.user_auth_info = {};
}
}), mediasugScroll.init(list);
var MediasugTemplateFunction = function(obj) {
var __t, __p = "";
with (Array.prototype.join, obj || {}) {
__p += "";
for (var i = 0; i < data.length; i++) {
var item = data[i];
__p += '<div class="ms-item" it-is-user-id="' + (null == (__t = item.user_id) ? "" : __t) + '"><div class="ms-avatar"><div class="ms-avatar-wrap"><img class="ms-avatar-image" src="' + (null == (__t = item.avatar_url) ? "" : __t) + '"></div>', 
useServerV && item.user_verified && item.user_auth_info && item.user_auth_info.auth_type && (__p += "" + (null == (__t = buildServerVIcon2(item.user_auth_info.auth_type, "avatar_icon")) ? "" : __t)), 
__p += '</div><div class="ms-name-wrap"><div class="ms-name ' + (null == (__t = !useServerV && item.user_verified ? " verified" : "") ? "" : __t) + '">' + (null == (__t = item.name) ? "" : __t) + '</div></div><div class="ms-desc">' + (null == (__t = item.reason_description) ? "" : __t) + '</div><button reason="' + (null == (__t = item.reason) ? "" : __t) + '" class="ms-subs" ' + (null == (__t = item.is_following ? " isfollowing " : "") ? "" : __t) + " " + (null == (__t = item.is_followed ? " isfollowed " : "") ? "" : __t) + ' ><span class="focus-icon">&nbsp;</span></button></div>';
}
__p += "";
}
return __p;
}, MediasugTemplateString = MediasugTemplateFunction({
data: list,
useServerV: Page.useServerV
});
$("#mediasug-list-html").html(MediasugTemplateString).css("width", 150 * list.length + 10 + 15 + "px"), 
$("header").attr("sugstate", "open"), client.isAndroid && parseFloat(client.osVersion) < 5 ? ($("#mediasug-list").on("touchstart touchmove", function() {
sendBytedanceRequest("disable_swipe");
}).on("touchend touchcancel", function() {
sendBytedanceRequest("enable_swipe");
}), $("#mediasug-list").on("scroll", _.throttle(mediasugScroll.handler, 150))) : ($("#mediasug-list").on("touchstart", mediasugScroll.horizontalScollStart), 
$("#mediasug-list").on("touchmove", mediasugScroll.horizontalScollMove).on("touchend touchcancel", mediasugScroll.horizontalScollEnd)), 
needCleanDoms.push($("#mediasug-list"));
}
}

function doFollowUser(t, e, a, n, i) {
subscribeTimeoutTimer = setTimeout(change_following_state, 1e4, a, !0), ToutiaoJSBridge.call("user_follow_action", {
id: t,
action: a ? "unfollow" : "dofollow",
reason: n,
source: i
}, function(t) {
clearTimeout(subscribeTimeoutTimer), "object" == typeof t && 1 == t.code && change_following_state(!!t.status, !0);
});
}

function doFollowMedia(t, e, a, n) {
var i = "" === n;
Page.hasExtraSpace && i, subscribeTimeoutTimer = setTimeout(change_following_state, 1e4, a, !0), 
ToutiaoJSBridge.call(a ? "do_media_unlike" : "do_media_like", {
id: e,
uid: t,
concern_type: n,
source: followSource.pgc
}, function(t) {
clearTimeout(subscribeTimeoutTimer), 1 == t.code ? change_following_state(!a, !0, function(t) {
t ? send_umeng_event("preview", "preview_click_sub") : send_umeng_event("preview", "preview_click_cancel_sub");
}) : client.isAndroid || client.isNewsArticleVersionNoLessThan("5.7.2") ? change_following_state(a, !0) : change_following_state(a, !0);
});
}

function processForumArticle2() {
var t = formatCount(null, forum_extra.read_count, "0");
$("#origin-read-count").html(t);
for (var e = document.querySelectorAll(".emoji"), a = 0, n = e.length, a = 0; n > a; a++) e[a].style.backgroundImage = "url(http://s3.pstatp.com/toutiao/tt_tps/static/images/ttemoji/" + e[a].classList[1] + "@3x.png)";
}

function bindRepostEvent() {
$(".tt-repost-thread").on("click", function(t) {
var e = $(t.target);
0 === e.closest(".image").length && 0 === e.closest(".originuser").length && (location.href = this.dataset.openUrl);
}), $(".tt-repost-ugcvideo").on("click", function(t) {
var e = $(t.target);
0 === e.closest(".cover").length && 0 === e.closest(".originuser").length && (location.href = this.dataset.openUrl);
});
}

function processProHref() {
$("[pro-href]").each(function(t, e) {
var a = $(e), n = a.attr("starhref");
if (n) {
if (Page.useServerV) try {
var i = JSON.parse(a.attr("user-auth-info")).auth_type;
a.addClass("new-v").append(buildServerVIcon(i, "label_icon"));
} catch (o) {}
a.attr("href", n);
var r = n.match(/\d+/i);
r = r ? +r[0] : 0, a.attr("uid", r), sendUmengWhenTargetShown(e, "star_words", "show", {
value: r
}, !0);
} else a.attr("href", a.attr("pro-href")), sendUmengWhenTargetShown(e, "highlight_words", "show", {
value: Page.statistics.group_id,
extra: {
highword: encodeURIComponent(a.text())
}
}, !0);
});
}

function processTable() {
client.isAndroid ? $("table").each(function(t, e) {
$(e).addClass("border").wrap('<div class="table-wrap horizontal_scroll_android"/>');
}) : client.isIOS && $("table").each(function(t, e) {
var a = $(e);
if (a.addClass("border").wrap('<div class="table-wrap horizontal_scroll"/>'), a.width() > innerWidth - 30) {
var n = a.parent(), i = $('<div class="swipe_tip">左滑查看更多</div>');
n.append(i), n.on("touchstart", function() {
i.css("opacity", "0");
}).on("scroll touchend", function() {
0 === this.scrollLeft && i.css("opacity", "1");
}), needCleanDoms.push(n);
}
});
}

function appendVideoImg() {
var t = this.parentNode;
t && (t.style.background = "black");
}

function errorVideoImg() {
var t = this.parentNode;
t && t.removeChild(this);
}

function processCustomVideo() {
$(".custom-video").each(function(t, e) {
var a = $(e), n = e.dataset, i = n.width, o = n.height, r = .75, s = 0, l = r, c = "";
i && o && (s = o / i, r >= s ? l = s : c = "height: 100%; width: auto;");
var d = e.clientWidth;
if (a.css("height", d * l + "px"), n.wendaSource && "object" == typeof window.wenda_extra) {
var u = formatDuration(n.duration);
if (a.html('<img src="' + n.poster + '" style="' + c + '" onload="appendVideoImg.call(this)" onerror="errorVideoImg.call(this)" /><i class="custom-video-trigger"></i><i class="custom-video-duration">' + u + "</i>"), 
"pgc" === n.wendaSource) {
var _ = $('<a class="cv-wd-info-wrapper" href="' + n.openUrl + '"><span class="cv-wd-info-name" ' + (Boolean(Number(n.isVerify)) ? "is-verify" : "") + ">" + n.mediaName + '</span><span class="cv-wd-info-pc">' + n.playCount + "次播放</span></a>");
_.on("click", function() {
ToutiaoJSBridge.call("pauseVideo"), send_umeng_event("answer_detail", "click_video_detail", {
value: wenda_extra.ansid,
extra: {
video_id: n.vid,
enter_from: wenda_extra.enter_from || "",
ansid: wenda_extra.ansid,
qid: wenda_extra.qid,
parent_enterfrom: wenda_extra.parent_enterfrom || ""
}
});
}), needCleanDoms.push(_), a.after(_);
}
var p = {
value: wenda_extra.ansid,
extra: {
position: "detail",
video_id: n.vid,
enter_from: wenda_extra.enter_from || "",
ansid: wenda_extra.ansid,
qid: wenda_extra.qid,
parent_enterfrom: wenda_extra.parent_enterfrom || ""
}
};
window.wenda_extra && window.wenda_extra.answer_detail_type ? wendaCacheAdd(function() {
sendUmengWhenTargetShown(e, "video_show", "click_question_and_answer", p, !0);
}) : sendUmengWhenTargetShown(e, "video_show", "click_question_and_answer", p, !0);
} else a.html('<img src="' + n.poster + '" style="' + c + '" onload="appendVideoImg.call(this)" onerror="errorVideoImg.call(this)" /><i class="custom-video-trigger"></i>');
Page.hasExtraSpace = !1;
});
}

function checkDisplayedFactory(t, e) {
return lastBottom = {}, function() {
var a = document.querySelector(t);
if (a) {
var n = a.getBoundingClientRect();
n.bottom < 0 && lastBottom[t] >= 0 ? ToutiaoJSBridge.call(e, {
show: !0
}) : n.bottom >= 0 && lastBottom[t] < 0 && ToutiaoJSBridge.call(e, {
show: !1
}), lastBottom[t] = n.bottom;
}
};
}

function processPageStateChangeEvent(t) {
switch (t.type) {
case "pgc_action":
console.info("pgc_action", t), subscribeTimeoutTimer && clearTimeout(subscribeTimeoutTimer);
var e = $(".subscribe-button"), a = e.data("mediaId");
t.id == a && "status" in t && change_following_state(!!t.status, !0);
break;

case "user_action":
console.info("user_action", t), subscribeTimeoutTimer && clearTimeout(subscribeTimeoutTimer);
var e = $(".subscribe-button"), n = e.data("userId");
if (t.id == n && "status" in t) change_following_state(!!t.status, !0); else {
var i = $('[it-is-user-id="' + t.id + '"]');
i.length > 0 && "status" in t && (i.find(".ms-subs").attr("isfollowing", t.status ? "" : null), 
t.status && mediasugScroll.next(), doRecommendUsers(Page.author.userId, function(e) {
if (Array.isArray(e)) for (var a = e.length, n = 0; a > n; n++) e[n].user_id == t.id && (e[n].is_following = !!t.status);
}, function() {}));
}
break;

case "wenda_digg":
var o = $("#digg").attr("data-answerid");
if (window.wenda_extra && window.wenda_extra.wd_version >= 8 && t.id === window.wenda_extra.ansid) {
var r = +$(".digg-count-special").attr("realnum");
"status" in t && (1 == t.status ? formatCount(".digg-count-special", r + 1, "0") : r > 0 && formatCount(".digg-count-special", r - 1, "0"));
} else if (t.id == o && "digged" !== $("#digg").attr("wenda-state")) {
$("#digg").attr("wenda-state", "digged");
var r = +$("#digg").find(".digg-count").attr("realnum");
formatCount(".digg-count", r + 1, "赞"), formatCount(".digg-count-special", r + 1, "0");
}
break;

case "wenda_bury":
var o = $("#bury").attr("data-answerid");
if (t.id == o && "buryed" !== $("#bury").attr("wenda-state")) {
$("#bury").attr("wenda-state", "buryed");
var s = +$("#bury").find(".bury-count").attr("realnum");
formatCount(".bury-count", s + 1, "踩");
}
break;

case "forum_action":
var l = $(".pcard.fiction").find(".button"), c = l.attr("forum-id");
t.id == c && l.attr("is-concerned", Boolean(t.status)).html(t.status ? "已关注" : "关注");
break;

case "concern_action":
var l = $(".pcard.fiction").find(".button"), d = l.attr("concern-id");
t.id == d && l.attr("is-concerned", Boolean(t.status)).html(t.status ? "已关注" : "关注");
break;

case "carousel_image_switch":
"function" == typeof onCarouselImageSwitch && (Page.forum_extra && Page.forum_extra.thread_id == t.id ? onCarouselImageSwitch(t.status) : Page.wenda_extra && Page.wenda_extra.ansid == t.id ? onCarouselImageSwitch(t.status) : Page.statistics.group_id == t.id && onCarouselImageSwitch(t.status));
break;

case "block_action":
if (console.info(t), 1 == t.status) {
var e = $(".subscribe-button"), n = e.data("userId");
if (t.id == n) change_following_state(!1, !0); else {
var i = $('[it-is-user-id="' + t.id + '"]');
i.length > 0 && i.find(".ms-subs").attr("isfollowing", null);
}
}
}
}

function processParagraph() {
var t = /[\u2e80-\u2eff\u3000-\u303f\u3200-\u9fff\uf900-\ufaff\ufe30-\ufe4f]/, e = /[a-z0-9_:\-\/.%]{26,}/gi, a = /huawei/.test(navigator.userAgent.toLowerCase());
a && document.body.classList.add("huawei"), $("article p").each(function(a, n) {
if (!(n.classList.contains("pgc-img-caption") || !n.textContent || $(n).find(".image").length > 0)) if (t.test(n.textContent)) {
if (e.test(n.textContent)) {
var i = n.textContent.match(e);
i.forEach(function(t) {
n.innerHTML = n.innerHTML.replace(t, function(t) {
return '<br class="sysbr">' + t;
});
});
}
} else n.style.textAlign = "left";
});
}

function GameCard(t, e) {
GameCard.startListen(), this.prepareData(t, e);
}

function setContent(t) {
if (startTimestamp = Date.now(), null !== t) {
var e = t.indexOf("<article>"), a = t.indexOf("</article>"), n = t.substring(e + 9, a);
globalContent = n || t;
}
}

function setExtra(t) {
void 0 === t ? globalExtras = window : "object" == typeof t.h5_extra ? globalExtras = t : client.isIOS ? globalExtras.h5_extra = t : client.isAndroid && (globalExtras.h5_extra = $.extend(!0, globalExtras.h5_extra, t)), 
window.Page = buildPage(globalExtras), window.OldPage ? _.isEqual(window.OldPage, window.Page) || (window.OldPage = window.Page, 
buildHeader(window.Page)) : (window.sendTTCustomizeLog && window.sendTTCustomizeLog("start_build_article", +new Date() - startTimestamp), 
window.OldPage = window.Page, TouTiao.setDayMode(Page.pageSettings.is_daymode ? 1 : 0), 
TouTiao.setFontSize(Page.pageSettings.font_size), buildUIStyle(Page.h5_settings), 
buildHeader(window.Page), buildArticle(globalContent), buildFooter(window.Page), 
functionName());
}

function functionName() {
sendBytedanceRequest("domReady"), window.sendTTCustomizeLog && window.sendTTCustomizeLog("start_process_article", +new Date() - startTimestamp), 
ToutiaoJSBridge.on("page_state_change", processPageStateChangeEvent), processArticle(), 
window.sendTTCustomizeLog && window.sendTTCustomizeLog("end_process_article", +new Date() - startTimestamp), 
null !== globalCachedContext && contextRenderer(globalCachedContext), canSetContext = !0;
}

function insertDiv(t) {
window.sendTTCustomizeLog && window.sendTTCustomizeLog("start_insert_div", +new Date() - startTimestamp), 
canSetContext ? contextRenderer(t) : globalCachedContext = t;
}

function onQuit() {
Page && Page.author && Page.author.userId && mediasugScroll.clearData(Page.author.userId), 
Page = {}, OldPage = null, globalContent = void 0, canSetContext = !1, needCleanDoms.forEach(function(t) {
t.off();
}), needCleanDoms = [], imprProcessQueue = [], flushErrors(!0), $("header").replaceWith("<header>"), 
$("article").empty(), $("footer").empty(), $(document).off("scroll"), "onGetSeriesLinkPositionTimer" in window && clearInterval(onGetSeriesLinkPositionTimer);
}

function bindStatisticsEvents() {
document.addEventListener("scroll", function() {
imprProcessQueue.length > 0 && imprProcessQueue.forEach(function(t, e, a) {
t && isElementInViewportY(t[0], t[4]) && (send_umeng_event(t[1], t[2], t[3]), a[e] = void 0);
});
}, !1);
var t = $(document.body);
t.on("click", ".pgc-link", function() {
"forum" === Page.article.type ? send_umeng_event("talk_detail", "click_ugc_header", Page.forumStatisticsParams) : "pgc" === Page.article.type && send_umeng_event("detail", "click_pgc_header", {
value: Page.author.mediaId,
extra: {
item_id: Page.statistics.item_id
}
});
}), t.on("click", "#prev_serial_link", function() {
send_umeng_event("detail", "click_pre_group", {
value: Page.statistics.group_id,
extra: {
item_id: Page.statistics.item_id
}
});
}).on("click", "#next_serial_link", function() {
send_umeng_event("detail", "click_next_group", {
value: Page.statistics.group_id,
extra: {
item_id: Page.statistics.item_id
}
});
}).on("click", "#index_serial_link", function() {
send_umeng_event("detail", "click_catalog", {
value: Page.statistics.group_id,
extra: {
item_id: Page.statistics.item_id
}
});
}), t.on("click", ".custom-video", function() {
playVideo(this, 0);
}), t.on("click", "[pro-href]", function() {
$(this).attr("starhref") ? send_umeng_event("star_words", "click", {
value: $(this).attr("uid")
}) : send_umeng_event("highlight_words", "click", {
value: Page.statistics.group_id,
extra: {
highword: encodeURIComponent($(this).text())
}
});
}), t.on("click", "#digg", function() {
"digged" === $(this).attr("wenda-state") ? ToutiaoJSBridge.call("toast", {
text: "你已经赞过",
icon_type: "icon_error"
}) : "buryed" === $("#bury").attr("wenda-state") ? ToutiaoJSBridge.call("toast", {
text: "你已经踩过",
icon_type: "icon_error"
}) : ToutiaoJSBridge.call("page_state_change", {
type: "wenda_digg",
id: $(this).attr("data-answerid"),
status: 1
});
}), t.on("click", "#bury", function() {
"buryed" === $(this).attr("wenda-state") ? ToutiaoJSBridge.call("toast", {
text: "你已经踩过",
icon_type: "icon_error"
}) : "digged" === $("#digg").attr("wenda-state") ? ToutiaoJSBridge.call("toast", {
text: "你已经赞过",
icon_type: "icon_error"
}) : ToutiaoJSBridge.call("page_state_change", {
type: "wenda_bury",
id: $(this).attr("data-answerid"),
status: 1
});
});
}

function playVideo(t, e) {
var a = t.getAttribute("data-video-size"), n = t.getBoundingClientRect(), i = [ n.left, t.offsetTop, 640, 435 ];
if (a) {
var o = null;
try {
o = JSON.parse(a), o && o.normal && o.normal.h && o.normal.w && (i[2] = o.normal.w, 
i[3] = o.normal.h);
} catch (r) {}
}
ToutiaoJSBridge.call("playNativeVideo", {
sp: t.getAttribute("data-sp"),
vid: t.getAttribute("data-vid"),
frame: i,
status: e
}, function(t) {
if ($(".custom-video").show(), 1 == t.code) {
var e = document.querySelector('[data-vid="' + t.vid + '"]');
e && (e.style.display = "none", $(e).next(".cv-wd-info-wrapper").hide(), window.wenda_extra && window.wenda_extra.wd_version && (t.height += 15), 
document.body.style.marginTop = t.height + "px");
}
});
}

function onCarouselImageSwitch(t) {
console.info("onCarouselImageSwitch", t), AndroidImageProcessor.showLargeImage(AndroidImageProcessor.$images.get(t), !0);
}

function tellClientContentSize() {
var t = 0;
setInterval(function() {
var e = document.querySelector("footer").getBoundingClientRect(), a = e.top + e.height;
a !== t && (t = a, ToutiaoJSBridge.call("webviewContentResize", {
height: a
}));
}, 200);
}

function _processArticle() {
switch (processParagraph(), Page.article.type) {
case "forum":
bindRepostEvent();
break;

case "pgc":
processTable(), processProHref(), processCustomVideo(), pgcEvent.emit("card-render", document.body);
break;

case "wenda":
processTable(), processCustomVideo();
}
$(document).on("scroll", checkHeaderDisplayed), $(document).on("scroll", checkWendaABHeaderLayout), 
$(document).on("scroll", checkWendanextDisplayed), onGetSeriesLinkPositionTimer = setInterval(function() {
if (!document.querySelector(".serial")) return void clearInterval(onGetSeriesLinkPositionTimer);
var t = document.querySelector(".serial").offsetTop;
t > 0 && (clearInterval(onGetSeriesLinkPositionTimer), ToutiaoJSBridge.call("onGetSeriesLinkPosition", {
value: document.body.scrollHeight - t
}));
}, 500);
}

window.client = {
isAndroid: /android/i.test(navigator.userAgent),
isIOS: /iphone/i.test(navigator.userAgent),
newsArticleVersion: _getNewsArticleVersion()
}, client.osVersion = client.isAndroid ? _getAndroidVersion() : client.isIOS ? _getIOSVersion() : "", 
client.isSeniorAndroid = client.isAndroid ? parseFloat(client.osVersion) >= 4.4 : !0, 
client.isNewsArticleVersionNoLessThan = _isNewsArticleVersionNoLessThan;

var hash = function() {
var t = location.hash.substr(1), e = {};
return t && t.split("&").forEach(function(t) {
t = t.split("=");
var a = t[0], n = t[1];
a && (e[a] = n);
}), function(t, a) {
var n = {};
return void 0 === t && void 0 === a ? location.hash : void 0 === a && "string" == typeof t ? e[t] : ("string" == typeof t && "string" == typeof a ? n[t] = a : void 0 === a && "object" == typeof t && (n = t), 
$.extend(e, n), void (location.hash = hash2string(e)));
};
}(), getMeta = function() {
for (var t = document.getElementsByTagName("meta"), e = {}, a = 0, n = t.length; n > a; a++) {
var i = t[a].name.toLowerCase(), o = t[a].getAttribute("content");
i && o && (e[i] = o);
}
return function(t) {
return e[t];
};
}(), event_type = client.isAndroid ? "log_event" : "custom_event", sendBytedanceRequest = function() {
var t = "SEND-BYTE--DANCE-REQUEST", e = document.getElementById(t);
return e || (e = document.createElement("iframe"), e.id = t, e.style.display = "none", 
document.body.appendChild(e)), function(t) {
e.src = "bytedance://" + t;
};
}(), WendaCacheUmeng = [];

!function() {
var t = {};
window.PressState = function(t) {
var e = {
holder: "body",
bindSelector: "",
exceptSelector: "",
pressedClass: "pressed",
triggerLatency: 100,
removeLatency: 100
};
this.settings = $.extend({}, e, t), this._init();
}, PressState.prototype = {
_init: function() {
"" != this.settings.bindSelector && (this._appendClass(), this._bindEvent());
},
_appendClass: function() {
if ("pressed" == this.settings.pressedClass) {
var t = "<style type='text/css'>.pressed{background-color: #e0e0e0 !important;} .night .pressed{background-color: #1b1b1b !important;}</style>";
$("body").append(t);
}
},
_bindEvent: function() {
var e = this.settings.holder, a = "" == this.settings.exceptSelector ? this.settings.bindSelector : [ this.settings.bindSelector, this.settings.exceptSelector ].join(","), n = this.settings.exceptSelector, i = this.settings.pressedClass, o = parseInt(this.settings.triggerLatency), r = parseInt(this.settings.removeLatency);
$(e).on("touchstart", a, function(e) {
if (!$(this).is(n)) {
var a = $(this);
t.mytimer = setTimeout(function() {
a.addClass(i);
}, o), t.tar = e.target;
}
}), $(e).on("touchmove", a, function() {
$(this).is(n) || (clearTimeout(t.mytimer), $(this).removeClass(i), t.tar = null);
}), $(e).on("touchend touchcancel", a, function(e) {
if (!$(this).is(n) && t.tar === e.target) {
clearTimeout(t.mytimer), $(this).hasClass(i) || $(this).addClass(i);
var a = $(this);
setTimeout(function() {
a.removeClass(i);
}, r);
}
});
}
};
}();

var renderHeader = function(obj) {
var __t, __p = "";
with (Array.prototype.join, obj || {}) {
if (__p += '<header topbutton-type="' + (null == (__t = data.topbuttonType) ? "" : __t) + '" sugstate="no" ' + (null == (__t = data.hasExtraSpace ? "" : "no-extra-space") ? "" : __t) + ">", 
__p += "", data.h5_settings.pgc_over_head || (__p += '<div class="tt-title">' + (null == (__t = data.article.title) ? "" : __t) + "</div>"), 
__p += "", __p += "", "zhuanma" == data.article.type) __p += '<div class="zhuanma-wrapper"><span class="zm-time">' + (null == (__t = data.article.publishTime) ? "" : __t) + '</span><span class="zm-author">' + (null == (__t = data.author.name) ? "" : __t) + "</span></div>"; else {
if (__p += '<div class="authorbar ' + (null == (__t = data.article.type) ? "" : __t) + '" id="profile">', 
__p += '<a class="author-avatar-link pgc-link" href="' + (null == (__t = data.author.link) ? "" : __t) + '"><div class="author-avatar"><img class="author-avatar-img" src="' + (null == (__t = data.author.avatar) ? "" : __t) + '"></div>', 
data.useServerV && data.author.auth_info && (__p += "" + (null == (__t = buildServerVIcon2(data.author.auth_type, "avatar_icon")) ? "" : __t)), 
__p += "</a>", __p += "", "wenda" === data.article.type ? __p += '<div class="wenda-info" style="display: ' + (null == (__t = data.author.isAuthorSelf ? "block" : "none") ? "" : __t) + ';"><span class="read-info brow-count"></span><span class="like-info digg-count-special"></span></div>' : "forum" === data.article.type && (__p += '<div class="wenda-info" style="display: ' + (null == (__t = data.author.isAuthorSelf ? "block" : "none") ? "" : __t) + ';"><span></span></div>'), 
__p += "", __p += '<div class="author-function-buttons"><div class="mediasug-arrow-button iconfont"></div><button class="subscribe-button follow-button ' + (null == (__t = "followState" in data.author ? data.author.followState : "disabled") ? "" : __t) + '"data-user-id="' + (null == (__t = data.author.userId) ? "" : __t) + '"data-media-id="' + (null == (__t = data.author.mediaId) ? "" : __t) + '"style="display: ' + (null == (__t = data.author.isAuthorSelf || "wenda" === data.article.type && data.h5_settings.is_liteapp || "forum" === data.article.type && "following" === data.author.followState || data.hideFollowButton ? "none" : "block") ? "" : __t) + ';"id="subscribe"><i class="iconfont focusicon">&nbsp;</i></button></div>', 
__p += '<div class="author-bar"><div class="name-link-wrap"><div class="name-link-w ' + (null == (__t = "wenda" === data.article.type && "" === data.author.intro && 0 === data.tags.length ? "no-intro" : "") ? "" : __t) + '">', 
("forum" === data.article.type || "wenda" === data.article.type) && data.author.medals && data.h5_settings.ugc_user_medal) {
__p += '<div class="article-medal">';
for (var medal in data.author.medals) {
var _medal = data.author.medals[medal];
__p += "", data.h5_settings.ugc_user_medal[_medal] && (__p += '<img src="' + (null == (__t = data.h5_settings.ugc_user_medal[_medal]) ? "" : __t) + '">'), 
__p += "";
}
__p += "</div>";
}
if (__p += "", data.useServerV || (__p += "", "" != data.author.verifiedContent && (__p += '<div class="iconfont verified-icon">&#xe600;</div>'), 
__p += ""), __p += '<a class="author-name-link pgc-link" href="' + (null == (__t = data.author.link) ? "" : __t) + '">' + (null == (__t = data.author.name) ? "" : __t) + '</a></div></div><a class="sub-title-w" href="' + (null == (__t = data.author.link) ? "" : __t) + '"><div class="article-tags">', 
data.tags.length > 0) {
__p += "";
for (var tag in data.tags) __p += "", __p += "原创" == data.tags[tag] ? '<div class="article-tag-original"></div>' : '<div class="article-tag">' + (null == (__t = data.tags[tag]) ? "" : __t) + "</div>", 
__p += "";
__p += "";
}
__p += "</div>", __p += "pgc" === data.article.type ? '<span class="sub-title">' + (null == (__t = data.article.publishTime) ? "" : __t) + (null == (__t = data.author.auth_info && data.article.publishTime ? "&nbsp;&middot;&nbsp;" : "") ? "" : __t) + (null == (__t = data.author.auth_info) ? "" : __t) + "</span>" : "forum" === data.article.type ? '<span class="sub-title">' + (null == (__t = data.article.publishTime) ? "" : __t) + (null == (__t = data.author.intro && data.article.publishTime ? "&nbsp;&middot;&nbsp;" : "") ? "" : __t) + (null == (__t = data.author.intro) ? "" : __t) + "</span>" : '<span class="sub-title">' + (null == (__t = data.author.intro) ? "" : __t) + "</span>", 
__p += "</a></div></div>", __p += '<div class="mediasug-outer-container"><div class="mediasug-inner-container"><div class="ms-pointer"></div><div class="ms-title">相关推荐</div><div class="ms-list" id="mediasug-list"><div class="ms-list-scroller" id="mediasug-list-html"></div></div></div></div>', 
__p += '<div class="concern-guide-picture" id="concern-guide-picture" show="' + (null == (__t = data.h5_settings.is_show_concern_guide_picture && "following" !== data.author.followState && !data.author.isAuthorSelf ? "true" : "false") ? "" : __t) + '"></div>', 
__p += '<div class="copy-authorbar" id="copy-authorbar" style="display: none;" topbutton-type="' + (null == (__t = data.topbuttonType) ? "" : __t) + '"><a class="authorbar ' + (null == (__t = data.article.type) ? "" : __t) + '" id="profile-copy" href="' + (null == (__t = data.author.link) ? "" : __t) + '">', 
__p += '<div class="author-avatar-link pgc-link"><div class="author-avatar"><img class="author-avatar-img" src="' + (null == (__t = data.author.avatar) ? "" : __t) + '"></div>', 
data.useServerV && data.author.auth_info && (__p += "" + (null == (__t = buildServerVIcon2(data.author.auth_type, "avatar_icon")) ? "" : __t)), 
__p += "</div>", __p += '<div class="subscribe-button follow-button ' + (null == (__t = "followState" in data.author ? data.author.followState : "disabled") ? "" : __t) + '"data-user-id="' + (null == (__t = data.author.userId) ? "" : __t) + '"data-media-id="' + (null == (__t = data.author.mediaId) ? "" : __t) + '"style="display: ' + (null == (__t = data.author.isAuthorSelf ? "none" : "block") ? "" : __t) + ';"data-concerntype="detail_card"><i class="iconfont focusicon">&nbsp;</i></div><div class="author-bar"><div class="name-link-w ' + (null == (__t = "" === data.author.intro ? "no-intro" : "") ? "" : __t) + '"><span class="author-name-link pgc-link">' + (null == (__t = data.author.name) ? "" : __t) + "</span>", 
data.useServerV || (__p += "", "" != data.author.verifiedContent && (__p += '<div class="iconfont verified-icon">&#xe600;</div>'), 
__p += ""), __p += '</div><div class="sub-title-w"><span class="sub-title">' + (null == (__t = data.author.intro) ? "" : __t) + "</span></div></div></a></div>";
}
__p += "", __p += "", data.h5_settings.pgc_over_head && (__p += '<div class="tt-title pgc-over-head">' + (null == (__t = data.article.title) ? "" : __t) + "</div>"), 
__p += "</header>";
}
return __p;
}, renderFooter = function(obj) {
var __t, __p = "";
with (Array.prototype.join, obj || {}) __p += "<footer>", data.wenda_extra && (__p += "", 
data.wenda_extra.wd_version >= 3 ? (__p += '<div class="wd-footer"><a href="#" class="link-more" id="wd-link-more" style="display:none;">了解更多</a><div class="publish-datetime">' + (null == (__t = data.article.publishTime) ? "" : __t) + "</div>", 
__p += data.wenda_extra.wd_version >= 6 ? '<a class="report" style="display:none" onclick="ToutiaoJSBridge.call(\'report\')">举报</a><span style="display:none" class="sep for-report" style="font-size:12px;">|</span><a class="editor-edit-answer no-icon" style="display:none">编辑</a><div item="dislike-and-report" class="dislike-and-report no-icon" style="display:none;" >反对</div>' : '<a class="editor-edit-answer" style="display:none">编辑</a><div class="dislike-and-report" onclick="ToutiaoJSBridge.call(\'dislike\', {options: 0x11});">不喜欢</div>', 
__p += "</div>") : __p += '<div class="wenda-bottom clearfix"><div class="create-time">' + (null == (__t = data.article.publishTime) ? "" : __t) + '</div></div><div class="bottom-buttons only-one"><div id="digg" data-answerid="' + (null == (__t = data.wenda_extra.ansid) ? "" : __t) + '" class="ib like" wenda-state="" aniok="' + (null == (__t = data.wenda_extra.aniok) ? "" : __t) + '"><span class="ibinner"><i class="iconfont iconb">&nbsp;</i><span class="b digg-count" realnum="0">赞</span></span></div><div id="bury" data-answerid="' + (null == (__t = data.wenda_extra.ansid) ? "" : __t) + '" class="ib unlike" wenda-state="" aniok="' + (null == (__t = data.wenda_extra.aniok) ? "" : __t) + '" style="display: none;"><span class="ibinner"><i class="iconfont iconb">&nbsp;</i><span class="b bury-count" realnum="0">踩</span></span></div></div>', 
__p += ""), __p += "", data.novel_data ? (__p += '<div class="serial">', __p += data.novel_data.pre_group_url ? '<a class="prev" id="prev_serial_link" href="' + (null == (__t = data.novel_data.pre_group_url) ? "" : __t) + '">上一章</a>' : '<span class="prev disabled">上一章</span>', 
__p += "", __p += data.novel_data.next_group_url ? '<a class="next" id="next_serial_link" href="' + (null == (__t = data.novel_data.next_group_url) ? "" : __t) + '">下一章</a>' : '<span class="next disabled">下一章</span>', 
__p += '<div class="index-wrap"><a class="index" id="index_serial_link" href="' + (null == (__t = data.novel_data.url) ? "" : __t) + '">目录（共' + (null == (__t = data.novel_data.serial_count) ? "" : __t) + "章）</a></div></div>") : data.wenda_extra && data.wenda_extra.wd_version >= 1 && data.wenda_extra.wd_version < 3 && (__p += '<div class="serial" style="display: ' + (null == (__t = data.wenda_extra.wd_version >= 2 ? "block" : "none") ? "" : __t) + ';"><a class="prev" id="wenda_index_link"><span id="total-answer-count-index"></span></a><a class="next" id="next_answer_link" onclick="ToutiaoJSBridge.call(\'tellClientRetryPrefetch\');">下一个回答</a></div>'), 
__p += "</footer>";
return __p;
}, globalWendaStates = {}, TouTiao = {
setFontSize: setFontSize,
setDayMode: setDayMode
};

window.autoplayed = !1;

var sendWeitoutiaoCardDisplayEvent = function() {
var t = "out", e = !0;
return function(a) {
if (a && a.needRecord && (e = a.needRecord), e) {
var n = $(".pcard.forum").get(0), i = "out", o = n.getBoundingClientRect();
o.bottom <= (window.innerHeight || document.body.clientHeight) && (i = "in"), "in" === i && "out" === t && (console.info("weitoutiao_in"), 
send_umeng_event("widget", "show_wtt", {
value: $("[data-content]").get(0).dataset.id,
extra: {
card_type: "1"
}
}), e = !1), t = i;
}
};
}(), contextRenderer = function(context) {
"object" == typeof context && (wendaConetxtRender(context), function() {
var cardTemplateFunctions = {
movie: function(obj) {
var __t, __p = "";
with (Array.prototype.join, obj || {}) __p += '<a class="pcard movie" href="' + (null == (__t = url) ? "" : _.escape(__t)) + '"><div class="pcard-container pcard-vertical-border"><div class="pcard-clearfix"><div class="pcard-pull-left" style="position: relative;"><div class="iconfont playicon"><i></i></div><img class="movie-image" src="' + (null == (__t = poster) ? "" : _.escape(__t)) + '"/></div><div class="movie-right"><button type="button" class="button pcard-button pcard-pull-right">进入</button><div class=""><div class="pcard-h16 pcard-w1 pcard-bold mb11">' + (null == (__t = name) ? "" : __t), 
"" !== tag && (__p += '<span class="pcard-ry icon-ry"></span>'), __p += "</div>", 
"string" == typeof actor_name && (__p += '<div class="pcard-h12 pcard-w1" style="margin-bottom: 5px;">' + (null == (__t = actor_name) ? "" : __t) + "</div>"), 
__p += '<div class="pcard-h12 pcard-w3 mb8">' + (null == (__t = desc) ? "" : __t) + "/" + (null == (__t = sub_title) ? "" : __t) + "</div>", 
__p += "number" == typeof score ? '<div class="pcard-h12 iconfont film-star-score" data-score="' + (null == (__t = Math.ceil(score)) ? "" : __t) + '">' + (null == (__t = score.toFixed(1)) ? "" : __t) + "</div>" : '<div class="pcard-h12 pcard-w1">暂无评分</div>', 
__p += "</div></div></div></div></a>";
return __p;
},
fiction: function(obj) {
var __t, __p = "";
with (Array.prototype.join, obj || {}) __p += '<a class="pcard fiction" href="' + (null == (__t = url) ? "" : _.escape(__t)) + '"><div class="pcard-container pcard-vertical-border"><div class="pcard-clearfix"><div class="pcard-pull-left "><img class="movie-image" src="' + (null == (__t = poster) ? "" : _.escape(__t)) + '"></div><div class="movie-right"><button class="button pcard-button pcard-pull-right" action="concern" is-concerned="' + (null == (__t = Boolean(is_concerned)) ? "" : _.escape(__t)) + '" concern-id="' + (null == (__t = concern_id) ? "" : _.escape(__t)) + '" forum-id="' + (null == (__t = forum_id) ? "" : _.escape(__t)) + '">' + (null == (__t = is_concerned ? "已关注" : "关注") ? "" : _.escape(__t)) + '</button><div class="pcard-h16 pcard-w1 pcard-o1 mb12">' + (null == (__t = name) ? "" : _.escape(__t)) + '</div><div class="pcard-h12 pcard-w1 pcard-o2 mb6">' + (null == (__t = abstract) ? "" : _.escape(__t)) + '</div><div class="pcard-h12 pcard-w3">' + (null == (__t = category) ? "" : _.escape(__t)) + " &nbsp; " + (null == (__t = note) ? "" : _.escape(__t)) + "</div></div></div></div></a>";
return __p;
},
auto: function(obj) {
var __t, __p = "";
with (Array.prototype.join, obj || {}) __p += '<div class="pcard  auto"><div class="pcard-caption"><span class="pcard-h14 pcard-w1">相关车型</span><span class="pcard-h14 pcard-w3 pcard-vr icon-vr width16"></span><span class="pcard-h14 pcard-w3">数据来源于易车</span></div><div class="p-autocard pcard-container pcard-vertical-border" data-href="' + (null == (__t = data.open_url) ? "" : __t) + '" data-content="content"><div class="pcard-clearfix"><div class="auto-image pcard-pull-left" style="background-image: url(' + (null == (__t = data.cover_url) ? "" : __t) + ');"></div><div class="container-right"><button type="button" class="pcard-button pcard-pull-right" data-href="' + (null == (__t = data.open_url) ? "" : __t) + '">详情</button><div class="" style="margin-right: 88px;"><div class="pcard-h16 pcard-w1" style="margin-bottom: 5px;">' + (null == (__t = data.car_series) ? "" : __t) + '</div><div class="pcard-h12 iconfont film-star-score" data-score="' + (null == (__t = Math.ceil(2 * data.rate)) ? "" : __t) + '" style="margin-bottom: 5px;">' + (null == (__t = data.rate) ? "" : __t) + '</div></div><div class="pcard-h14 pcard-w1">参考成交价: <span class="pcard-w4">￥' + (null == (__t = data.price) ? "" : __t) + '</span></div></div></div><div class="mt8"><a class="pcard-h14 pcard-w1-a" href="' + (null == (__t = data.jump_url[0]) ? "" : __t) + '" data-label="card_ask">询底价</a><span class="pcard-h14 pcard-w3 pcard-vr icon-vr" style="width: 30px;"></span><a class="pcard-h14 pcard-w1-a" href="' + (null == (__t = data.jump_url[1]) ? "" : __t) + '" data-label="card_second">二手车</a><span class="pcard-h14 pcard-w3 pcard-vr icon-vr" style="width: 30px;"></span><a class="pcard-h14 pcard-w1-a" href="' + (null == (__t = data.jump_url[2]) ? "" : __t) + '" data-label="card_sale">厂商活动</a><span class="pcard-h14 pcard-w3 pcard-vr icon-vr" style="width: 30px;"></span><a class="pcard-h14 pcard-w1-a" href="' + (null == (__t = data.jump_url[3]) ? "" : __t) + '" data-label="card_stages">分期买车</a></div></div></div>';
return __p;
},
game: function(obj) {
var __p = "";
with (Array.prototype.join, obj || {}) __p += '<div class="pcard game"><div class="pcard-caption"><span class="pcard-h14 pcard-w1">相关游戏</span></div><div class="pcard-container pcard-border game-body"></div></div>';
return __p;
},
stock: function(obj) {
var __t, __p = "";
with (Array.prototype.join, obj || {}) {
if (__p += '<div class="pcard op-stock">', data.length >= 3) {
__p += '<div class="pcard-container pcard-vertical-border opstock-body">';
for (var i in data) {
var _tempStock = data[i];
__p += '<div class="pcard-h16-large opstock-item"><a href="' + (null == (__t = _tempStock.url) ? "" : __t) + '" data-label = "card_detail"><span class="pcard-w1" style="width:64px;">' + (null == (__t = _tempStock.name) ? "" : __t) + "</span>", 
__p += 2 == _tempStock.rise ? '<span class="opstock-txt-up ml15">' + (null == (__t = _tempStock.price) ? "" : __t) + '</span><span class="opstock-txt-up ml15">' + (null == (__t = _tempStock.rate) ? "" : __t) + "</span>" : 3 == _tempStock.rise ? '<span class="opstock-txt-down ml15">' + (null == (__t = _tempStock.price) ? "" : __t) + '</span><span class="opstock-txt-down ml15">' + (null == (__t = _tempStock.rate) ? "" : __t) + "</span>" : '<span class="opstock-txt-stop ml15">' + (null == (__t = _tempStock.price) ? "" : __t) + '</span><span class="opstock-txt-stop ml15">' + (null == (__t = _tempStock.rate) ? "" : __t) + "</span>", 
__p += "</a>", __p += 0 == _tempStock.selected ? '<a class="button pcard-pull-right pcard-w1 opstock-button" data-stock="' + (null == (__t = _tempStock.code) ? "" : __t) + '" action="addStock"><span><i class="pcard-icon opstock-iconfont icon-plus"></i></span>自选股</a>' : '<a class="pcard-pull-right pcard-w3"><span><i class="pcard-icon opstock-iconfont icon-done"></i></span>已添加</a>', 
__p += "</div>";
}
__p += '</div><a class="pcard-w1 pcard-h14 pcard-footer" href="sslocal://webview?hide_bar=1&bounce_disable=1&url=http%3A%2F%2Fic.snssdk.com%2Fstock%2Fget_quota%2F%23tab%3Dportfolio" data-label="card_selected">进入我的自选股<span><i class="pcard-icon opstock-iconfont icon-rarrow opstock-rarrow"></i></span></a>';
} else __p += '<div class="pcard-caption"><span class="pcard-h14 pcard-w1">相关股票</span></div><div class="pcard-container pcard-border opstock-body-single" ><div class="pcard-clearfix"><div class="pcard-pull-left opstock-block ' + (null == (__t = 2 === data[0].rise ? "opstock-upblock" : 3 === data[0].rise ? "opstock-downblock" : "opstock-stopblock") ? "" : __t) + '" data-label="card_content" data-href="' + (null == (__t = data[0].url) ? "" : __t) + '"><div class="opstock-price">' + (null == (__t = 0 === data[0].rise ? "停牌" : data[0].price) ? "" : __t) + '</div><div class="opstock-change">' + (null == (__t = 0 === data[0].rise ? 0 : data[0].change) ? "" : __t) + "(" + (null == (__t = 0 === data[0].rise ? "0.00%" : data[0].rate) ? "" : __t) + ')</div></div><div class="movie-right opstock-info"><button class="button pcard-button pcard-pull-right opstock-button-single ml8 mt16" ' + (null == (__t = data[0].selected ? "selected" : "") ? "" : __t) + ' data-stock="' + (null == (__t = data[0].code) ? "" : __t) + '" action="addStock" type=\'single\'><i class="pcard-icon opstock-iconfont icon-plus"></i></button><div class="pcard-h16 pcard-w1 pcard-o1" style="font-weight: bold; margin-top: 8px;" data-label="card_content" data-href="' + (null == (__t = data[0].url) ? "" : __t) + '">' + (null == (__t = data[0].name) ? "" : _.escape(__t)) + '</div><div class="pcard-h14 pcard-w3" style="margin-top: 4px;" data-label="card_content" data-href="' + (null == (__t = data[0].url) ? "" : __t) + '">', 
("HK" == data[0].market || "US" == data[0].market) && (__p += '<i class="pcard-icon opstock-iconfont ' + (null == (__t = "HK" == data[0].market ? "icon-hk" : "icon-us") ? "" : __t) + '"></i>'), 
__p += "" + (null == (__t = data[0].code) ? "" : _.escape(__t)) + '</div></div></div><a class="pcard-w1 pcard-h14 pcard-footer" href="sslocal://webview?hide_bar=1&bounce_disable=1&url=http%3A%2F%2Fic.snssdk.com%2Fstock%2Fget_quota%2F%23tab%3Dportfolio" data-label="card_selected">进入我的自选股<span><i class="pcard-icon opstock-iconfont icon-rarrow opstock-rarrow"></i></span></a></div>';
__p += "</div>";
}
return __p;
},
weitoutiao: function(obj) {
var __t, __p = "";
with (Array.prototype.join, obj || {}) {
if (__p += '<div class="pcard forum"><div class="pcard-caption"><span class="pcard-h14 pcard-w1">微头条</span></div><div class="p-autocard pcard-container pcard-vertical-border" data-href="' + (null == (__t = data.open_url) ? "" : __t) + '" data-id="' + (null == (__t = data.id) ? "" : __t) + '" data-content="content"><div class="pcard-clearfix"><div class="header"><div class="authorbar" id="profile">', 
__p += '<a class="author-avatar-link"><div class="author-avatar"><img class="author-avatar-img" src="' + (null == (__t = data.user.avatar) ? "" : __t) + '"></div>', 
data.useServerV && data.user.auth && (__p += "" + (null == (__t = buildServerVIcon2(data.user.auth.auth_type, "avatar_icon")) ? "" : __t)), 
__p += '</a><div class="author-bar"><div class="name-link-wrap"><div class="name-link-w"><a class="author-name-link">' + (null == (__t = data.user.name) ? "" : __t) + '</a></div></div><a class="sub-title-w"><span class="sub-title">' + (null == (__t = data.time_disp) ? "" : __t) + (null == (__t = data.user.auth.auth_info && data.time_disp ? "&nbsp;&middot;&nbsp;" : "") ? "" : __t) + (null == (__t = data.user.auth.auth_info) ? "" : __t) + '</span></a></div></div></div><div class="content">', 
data.text && (__p += '<div class="title-outer"><div class="title-wrap"><div class="title"><span class="title-inner">' + (null == (__t = data.text) ? "" : _.escape(__t)) + "</span></div></div></div>"), 
__p += "", "video" == data.content_type) __p += '<div class="images-wrap video" style="width:' + (null == (__t = data.img_width) ? "" : __t) + "px;height:" + (null == (__t = data.img_height) ? "" : __t) + 'px; margin-bottom: 10px;"><div class="images" style="width:' + (null == (__t = data.img_width) ? "" : __t) + "px;height:" + (null == (__t = data.img_height) ? "" : __t) + "px;background-image: url(" + (null == (__t = data.video.cover_url) ? "" : __t) + ');"></div><i class="custom-video-trigger"></i><i class="custom-video-duration"> ' + (null == (__t = data.video.duration_str) ? "" : __t) + " </i></div>"; else if ("image" == data.content_type) {
__p += '<div style="margin-bottom: 10px;">';
for (var i in data.images) {
var tmp_img = data.images[i];
__p += '<div class="images-wrap ' + (null == (__t = 2 == i && data.more_img ? "more_img" : "") ? "" : __t) + '"><div class="images" style="width:' + (null == (__t = data.img_width) ? "" : __t) + "px;height:" + (null == (__t = data.img_height) ? "" : __t) + "px;background-image: url(" + (null == (__t = tmp_img.url) ? "" : __t) + ');"></div>', 
2 == i && data.more_img && (__p += '<span class="has_more">+' + (null == (__t = data.more_img) ? "" : __t) + "</span>"), 
__p += "</div>";
}
__p += "</div>";
}
__p += '<p class="poi">', data.location && (__p += '<span class="location" style="margin-right: 10px;">' + (null == (__t = data.location) ? "" : __t) + "</span>"), 
__p += "<span>" + (null == (__t = data.read_count_tips) ? "" : __t) + "</span></p></div></div></div></div>";
}
return __p;
}
};
"cards" in context && Array.isArray(context.cards) && context.cards.forEach(function(t) {
var e = t.type, a = {
value: Page.statistics.group_id,
extra: {
item_id: Page.statistics.item_id,
card_type: t.type,
card_id: t.id
}
};
if (e in cardTemplateFunctions) {
if ("auto" === e) {
if (!Array.isArray(t.jump_url) || 0 == t.jump_url.length) return;
var n = $(cardTemplateFunctions[e]({
data: t
}));
} else if ("game" === e) {
if (!Array.isArray(t.games) || 0 == t.games.length) return;
if (window.articleAlreadyHadGame) return;
var n = $(cardTemplateFunctions[e]({
data: t
}));
t.games.forEach(function(e) {
e.card_type = t.games.length + 2 + "", e.source = "recommend", e.tag = "article_match_app_ad";
var a = new GameCard(e);
n.find(".pcard-container").append(a.$card);
});
} else if ("stock" == e) {
var i = [], o = [];
try {
o = JSON.parse(t.keyphrase_stock);
} catch (r) {}
if (o.forEach(function(e) {
if (t.stocks[e]) try {
i.push(JSON.parse(t.stocks[e]));
} catch (a) {}
}), 0 == i.length) return;
send_umeng_event("stock", "article_with_card", a);
var s = [];
if (s = i.filter(function(t) {
return 0 == t.selected;
}), 0 == s.length) return;
i.map(function(t) {
t.url = "sslocal://webview?hide_bar=1&bounce_disable=1&url=" + encodeURIComponent("http://ic.snssdk.com/stock/slice/?code=" + t.market + t.code + "&from=article"), 
1 == t.selected && s.push(t);
});
var n = $(cardTemplateFunctions[e]({
data: s
}));
} else if ("weitoutiao" == e) {
t = t.weitoutiao;
try {
t.user.auth = JSON.parse(t.user.auth);
} catch (r) {}
if ("image" === t.content_type && t.images && Array.isArray(t.images)) {
switch (t.images.length) {
case 1:
t.img_width = innerWidth / 2, t.img_height = Math.min(t.images[0].height / t.images[0].width * t.img_width, t.img_width);
break;

case 2:
t.img_width = t.img_height = (innerWidth - 33) / 2;
break;

case 3:
t.img_width = t.img_height = (innerWidth - 36) / 3;
break;

default:
t.img_width = t.img_height = (innerWidth - 36) / 3, t.more_img = t.images.length - 3, 
t.images = t.images.splice(0, 3);
}
t.img_width = Math.floor(t.img_width), t.img_height = Math.floor(t.img_height);
}
"video" === t.content_type && (t.img_width = innerWidth - 30, t.img_height = 9 * t.img_width / 16, 
t.img_width = Math.floor(t.img_width), t.img_height = Math.floor(t.img_height)), 
t.useServerV = Page.useServerV;
var n = $(cardTemplateFunctions[e]({
data: t
}));
} else var n = $(cardTemplateFunctions[e](t));
n.on("click", ".button", function(e) {
e.stopPropagation(), send_umeng_event("detail", "click_card_button", a);
var n = $(this), i = n.attr("action");
"concern" === i ? dealNovelButton(e, t, n, a) : "addStock" == i && dealOptionalStockButton(e, n, t, s, a);
}), "auto" === e ? (n.find("[data-label]").on("click", function(t) {
t.stopPropagation(), send_umeng_event("detail", "click_" + this.dataset.label, a);
}), n.find('[type="button"]').on("click", function(t) {
t.stopPropagation(), location.href = this.dataset.href, send_umeng_event("detail", "click_card_button", a);
}), n.on("click", "[data-content]", function() {
location.href = this.dataset.href, send_umeng_event("detail", "click_card_content", a);
}), new PressState({
bindSelector: ".p-autocard",
exceptSelector: '[data-label],[type="button"]',
removeLatency: 500
})) : "stock" === e ? (n.find('[data-label="card_selected"]').on("click", function(t) {
t.stopPropagation(), send_umeng_event("stock", "article_into_mystock", a);
}), n.find('[data-label="card_detail"]').on("click", function(t) {
t.stopPropagation(), send_umeng_event("stock", "article_into_stock", a);
}), n.find('[data-label="card_content"]').on("click", function(t) {
t.stopPropagation(), location.href = this.dataset.href, send_umeng_event("stock", "article_into_stock", a);
})) : "weitoutiao" === e ? n.on("click", "[data-content]", function() {
send_umeng_event("widget", "go_detail", {
value: this.dataset.id,
extra: {
enter_from: "widget_wtt",
card_type: 1
}
}), location.href = this.dataset.href;
}) : n.on("click", function() {
send_umeng_event("detail", "click_card_content", a);
}), needCleanDoms.push(n), $("footer").prepend(n), "weitoutiao" === e && ($(".content .title").width() < $(".content .title-inner").width() && $(".content .title-wrap").before('<div class="whole-forum"><a class="whole-forum-inner">全文</a></div>'), 
sendWeitoutiaoCardDisplayEvent({
needRecord: !0
}), $(document).on("scroll", sendWeitoutiaoCardDisplayEvent), needCleanDoms.push($(document))), 
sendUmengWhenTargetShown(n.get(0), "detail", "card_show", a, !0);
}
});
}(), function() {
if (context.is_show_author_card && "pgc" === Page.article.type) {
var t = $("#copy-authorbar"), e = {
value: Page.statistics.group_id,
extra: {
item_id: Page.statistics.item_id,
card_type: "pgc_author_card",
card_id: Page.author.userId,
card_mid: Page.author.mediaId
}
}, a = t.find(".authorbar");
a.on("click", function() {
send_umeng_event("detail", "click_card_content", e);
}), needCleanDoms.push(a);
var n = t.find(".subscribe-button");
n.on("click", function(t) {
t.preventDefault(), send_umeng_event("detail", "click_card_button", $.extend(!0, {}, e, {
extra: {
status: $(this).hasClass("following") ? 1 : 0
}
}));
}), needCleanDoms.push(n), new PressState({
holder: "#copy-authorbar",
bindSelector: ".authorbar",
exceptSelector: ".subscribe-button",
removeLatency: 500
}), t.prependTo("footer").show(), needCleanDoms.push(t), sendUmengWhenTargetShown(t.get(0), "detail", "card_show", e, !0), 
t.find(".sub-title-w").height() > 20 && t.addClass("double-line");
}
}(), function() {
if ("know_more_url" in context) {
var t = $('<p><a href="sslocal://webview?url=' + encodeURIComponent(context.know_more_url) + '&title=%E7%BD%91%E9%A1%B5%E6%B5%8F%E8%A7%88">了解更多</a></p>');
$("article").append(t), t.on("click", function() {
send_umeng_event("detail", "click_landingpage", {
value: Page.author.mediaId,
extra: {
item_id: Page.statistics.item_id
}
});
}), needCleanDoms.push(t);
}
}(), globalCachedContext = null, canSetContext = !1, window.sendTTCustomizeLog && window.sendTTCustomizeLog("end_context_render", +new Date() - startTimestamp));
}, change_following_state = function() {
function t(t) {
var e = $("header"), n = $(".subscribe-button");
a = void 0, t ? (n.addClass("following").removeClass("disabled"), e.attr("fbs", "following")) : (n.removeClass("following disabled"), 
e.attr("fbs", ""), e.attr("sugstate", "no"));
}
var e, a;
return function(n, i, o) {
"function" == typeof o && o(n), i ? n !== a && (clearTimeout(e), a = n, e = setTimeout(t, 450, n, o)) : t(n, o);
};
}(), followSource = {
pgc: 30,
pgc_sug: 34,
forum: 29,
forum_sug: 69,
wenda: 28,
wenda_sug: 71
}, doRecommendUsers = function() {
function t(t, n, i) {
$.ajax({
dataType: "jsonp",
url: "http://ic.snssdk.com/api/2/relation/follow_recommends/",
data: t,
timeout: 1e4,
beforeSend: function() {
return e ? !1 : void (e = !0);
},
success: function(e, o, r) {
"success" === e.message && "object" == typeof e.data && Array.isArray(e.data.recommend_users) && e.data.recommend_users.length >= 3 ? (a[t.to_user_id] = e.data.recommend_users, 
domPrepare(), n(e.data.recommend_users)) : i(e, o, r);
},
error: function(t, e, a) {
i(a, e, t);
},
complete: function() {
e = !1;
}
});
}
var e = !1, a = {}, n = {};
return function(e, i, o, r) {
if ("function" == typeof i && "function" == typeof o) {
if (r && r.deleteCache) return void (a[e] && delete a[e]);
if (a[e]) return void i(a[e]);
var s = {
to_user_id: e,
page: 34
};
(client.isAndroid && client.isNewsArticleVersionNoLessThan("6.2.5") || client.isIOS && client.isNewsArticleVersionNoLessThan("6.2.6")) && $.isEmptyObject(n) ? ToutiaoJSBridge.call("TTNetwork.commonParams", {}, function(e) {
n = e.data || e, $.extend(!0, s, n), t(s, i, o);
}) : ($.extend(!0, s, n), t(s, i, o));
}
};
}(), mediasugScroll = function() {
var t, e, a, n = innerWidth, i = 150, o = 0, r = {}, s = 0, l = !1, c = [], d = "in", u = 0, p = 0, f = 0, h = 0, m = !1, g = "left", v = $("header").height() + 232;
return {
init: function(d) {
l || (l = !0, r = d, s = d.length, n = innerWidth, o = s * i + 24, this.imprcache = {}, 
this.imprlog = [], c = [], "pgc" === Page.article.type ? (t = "article", e = Page.statistics.group_id) : "forum" === Page.article.type ? (t = "weitoutiao", 
e = Page.forumStatisticsParams.value) : (t = Page.article.type, e = Page.wenda_extra.ansid), 
this.sendResult = {
imp_group_list_type: 19,
imp_group_key_name: "u11_recommend_user_" + t + "_detail_" + Page.author.userId,
imp_group_key: Page.author.userId,
imp_group_extra: {
source: t,
profile_user_id: Page.author.userId
},
impressions_in: [],
impressions_out: []
}, u = 0, p = 0, h = 0, f = 0, m = !1, g = "left", a = _.throttle(mediasugScroll.handler, 150), 
v = $("header").height() + 232);
},
range: function(t) {
var e = Math.floor(t / i);
e = Math.max(e, 0), t += n;
var a = Math.ceil(t / i);
a = Math.min(a, s) - 1;
for (var o = []; a >= e; ) o[o.length] = e++;
return o;
},
pushimpr: function(a) {
if (l) {
if (this.sendResult.impressions_in = [], Object.keys(this.imprcache).length > 0) {
this.sendResult.impressions_out = [];
for (var n in this.imprcache) {
var i = this.imprcache[n];
this.imprlog.push({
uid: n,
time: i,
duration: new Date().getTime() - i
}), console.info("leave", n), this.sendResult.impressions_out.push({
imp_item_type: 51,
imp_item_id: n,
imp_item_extra: {}
});
}
this.imprcache = {}, a && ToutiaoJSBridge.call("impression", this.sendResult);
}
console.info("pushimpr", this.imprlog), this.imprlog.length > 0 && (send_umeng_event("detail", "sub_reco_impression_v2", {
value: Page.author.userId,
extra: {
group_id: e,
impression: client.isIOS ? encodeURIComponent(JSON.stringify(mediasugScroll.imprlog)) : mediasugScroll.imprlog,
need_decode: client.isIOS ? 1 : 0,
source: t
}
}), this.imprlog = []);
}
},
dealimpr: function(t, e) {
var a = this, n = [];
if (t.forEach(function(t) {
var e = r[t].user_id;
if (e in a.imprcache) {
var i = a.imprcache[e];
a.imprlog.push({
uid: e,
time: i,
duration: new Date().getTime() - i
}), delete a.imprcache[e], a.sendResult.impressions_in = a.sendResult.impressions_in.filter(function(t) {
return t.imp_item_id != e;
}), n.push({
imp_item_type: 51,
imp_item_id: e,
imp_item_extra: {}
}), console.info("leave", e);
}
}), e.forEach(function(t) {
var e = r[t].user_id;
a.imprcache[e] = new Date().getTime(), a.sendResult.impressions_in.push({
imp_item_type: 51,
imp_item_id: e,
imp_item_extra: {}
}), console.info("enter", e);
}), t.length > 0 || e.length > 0) {
a.sendResult.impressions_out = n;
var i = {};
$.extend(!0, i, a.sendResult), ToutiaoJSBridge.call("impression", i);
}
},
handler: function() {
if (l) {
var t = 0;
t = mediasugScroll.range(client.isAndroid && parseFloat(client.osVersion) < 5 ? this.scrollLeft || 0 : Math.abs(f) || 0);
for (var e = [], a = {}, n = 0; n < c.length; n++) a[c[n]] = !0;
for (n = 0; n < t.length; n++) t[n] in a ? delete a[t[n]] : e.push(t[n]);
var i = Object.keys(a);
mediasugScroll.dealimpr(i, e), c = t;
}
},
open: function() {
c = [], mediasugScroll.handler();
},
pagescroll: function() {
if (l) {
var t = $("#mediasug-list").get(0), e = "in", a = t.getBoundingClientRect();
(a.bottom <= 0 || a.top > (window.innerHeight || document.body.clientHeight)) && (e = "out"), 
"in" === e && "out" === d ? (console.info("IN"), mediasugScroll.dealimpr([], c)) : "out" === e && "in" === d && (console.info("OUT"), 
mediasugScroll.pushimpr(!0)), d = e;
}
},
clearData: function(t) {
l = !1, doRecommendUsers(t, function() {}, function() {}, {
deleteCache: !0
});
},
horizontalScollStart: function(t) {
p = h = Math.floor(t.touches[0].pageX), u = 0, console.log("bytedance://disable_swipe");
},
horizontalScollMove: function(t) {
m || (m = !0), u = h - Math.floor(t.touches[0].pageX), Math.abs(u) > 0 && (h = Math.floor(t.touches[0].pageX), 
f + u > 0 && o - n > f + u && (u > 0 ? g = "left" : 0 > u && (g = "right"), f += u, 
$("#mediasug-list-html").css({
transform: "translateX(-" + f + "px)",
"-webkit-transform": "translateX(-" + f + "px)"
}), a()), t.preventDefault()), $("#mediasug-list").get(0).scrollLeft = 0;
},
horizontalScollEnd: function() {
if (console.log("bytedance://enable_swipe"), f % i != 0 && m) {
if ("left" === g) {
var t = i - f % i;
f + t > o - n ? (t = o - n - f, f = o - n) : f += t;
} else {
var t = f % i;
0 > f - t ? (t = f, f = 0) : f -= t;
}
$("#mediasug-list-html").css({
"transition-duration": t / i * 400 + "ms",
transform: "translateX(-" + f + "px)",
"-webkit-transform": "translateX(-" + f + "px)"
}), $("#mediasug-list-html").on("webkitTranditionEnd transitionend", mediasugScroll.cleanTransitionEnd);
}
m = !1, $("#mediasug-list").get(0).scrollLeft = 0;
},
cleanTransitionEnd: function() {
mediasugScroll.handler(), $("#mediasug-list-html").css({
"transition-duration": "0ms",
"-webkit-transition-duration": "0ms"
}), $("#mediasug-list-html").off("webkitTranditionEnd transitionend", mediasugScroll.cleanTransitionEnd);
},
next: function() {
client.isAndroid && parseFloat(client.osVersion) <= 4.4 || setTimeout(function() {
f + i < 150 * r.length + 8 + 10 - n && (f += i, $("#mediasug-list-html").css({
"transition-duration": "400ms",
transform: "translateX(-" + f + "px)",
"-webkit-transform": "translateX(-" + f + "px)"
}), $("#mediasug-list-html").on("transitionend", function() {
$("#mediasug-list-html").css("transition-duration", "0"), $("#mediasug-list-html").off("transitionend");
}), $("#mediasug-list-html").on("webkitTranditionEnd", function() {
$("#mediasug-list-html").css("transition-duration", "0"), $("#mediasug-list-html").off("webkitTranditionEnd");
}), mediasugScroll.handler());
}, 400);
},
webviewScroll: function(t) {
if (t.rect && !($("body").height() > innerHeight + 232)) {
var e, a, n, i, o, r = $("body").height();
if (o = t.rect.substring(1, t.rect.length - 1).split(","), e = o[0], a = -o[1], 
n = o[2], i = o[3], r === innerHeight) pos = 0 - v > a ? "out" : "in"; else {
var s = r - innerHeight;
pos = 0 - v + s > a ? "out" : "in";
}
"out" === d && "in" === pos ? mediasugScroll.dealimpr([], c) : "in" === d && "out" === pos && mediasugScroll.pushimpr(!0), 
d = pos;
}
}
};
}(), subscribeTimeoutTimer, checkHeaderDisplayed = checkDisplayedFactory("#profile", "showTitleBarPgcLayout"), checkWendanextDisplayed = checkDisplayedFactory(".serial", "showWendaNextLayout"), checkWendaABHeaderLayout = checkDisplayedFactory(".wenda-title", "showWendaABHeaderLayout");

GameCard.globalEventsList = {}, GameCard.startListen = function() {
GameCard.listenStartted || (ToutiaoJSBridge.on("app_ad_event", function(t) {
console.info("app_ad_event", t), t = t || {};
var e = t.appad || {}, a = e.id;
"function" == typeof GameCard.globalEventsList[a] ? GameCard.globalEventsList[a](t) : console.info("返回了没有注册的广告信息", t);
}), GameCard.listenStartted = !0);
}, GameCard.noDownloaderWordsMap = {
"1": [ "<i>&#xe689;</i>下载", "<i>&#xe653;</i>打开" ],
"2": [ "<i>&#xe689;</i>下载", "<i>&#xe653;</i>打开" ],
"3": [ "<i>&#xe689;</i><span>下载</span>", "<i>&#xe653;</i><span>打开</span>" ],
"4": [ "立即下载&nbsp;&#xe689;", "立即打开&nbsp;&#xe653;" ]
}, GameCard.wordsMap = {
"1": {
download_active: "暂停",
download_paused: "继续",
download_failed: "<i>&#xe689;</i>下载",
installed: "<i>&#xe653;</i>打开",
download_finished: "安装",
idle: "<i>&#xe689;</i>下载"
},
"2": {
download_active: "暂停",
download_paused: "继续",
download_failed: "<i>&#xe689;</i>下载",
installed: "<i>&#xe653;</i>打开",
download_finished: "安装",
idle: "<i>&#xe689;</i>下载"
},
"3": {
download_active: '<span style="display: block; margin-top: 8px;">暂停</span>',
download_paused: '<span style="display: block; margin-top: 8px;">继续</span>',
download_failed: "<i>&#xe689;</i><span>下载</span>",
installed: "<i>&#xe653;</i><span>打开</span>",
download_finished: '<span style="display: block; margin-top: 8px;">安装</span>',
idle: "<i>&#xe689;</i><span>下载</span>"
},
"4": {
download_active: "暂停下载",
download_paused: "继续下载",
download_failed: "重新下载",
installed: "立即打开&nbsp;&#xe653;",
download_finished: "立即安装",
idle: "立即下载&nbsp;&#xe689;"
}
}, GameCard.prototype = {
constructor: GameCard,
getDownloader: function() {
return client.isNewsArticleVersionNoLessThan("6.1.4");
},
getProgress: function(t, e) {
return [ "download_active", "download_paused" ].indexOf(t) > -1 ? "1" == this.appad.card_type || "2" == this.appad.card_type ? 50 >= e ? '<div class="progress-ring"><i class="left"><i style="transform: rotate(' + (180 + 3.6 * e) + 'deg);"></i></i></div>' : '<div class="progress-ring"><i class="left"><i></i></i><i class="right"><i style="transform: rotate(' + (-360 + 3.6 * e) + 'deg);"></i></i></div>' : void 0 : "";
},
subscribe: function() {
GameCard.globalEventsList[this.appad.id] = this.handler.bind(this), console.info("subscribe_app_ad", {
data: this.appad
}), ToutiaoJSBridge.call("subscribe_app_ad", {
data: this.appad
});
},
unsubscribe: function() {
delete globalEventsList[this.appad.id], console.info("unsubscribe_app_ad", {
data: this.appad
}), ToutiaoJSBridge.call("unsubscribe_app_ad", {
data: this.appad
});
},
getInstalledState: function(t) {
this.installed = t;
try {
this.$button.html(GameCard.noDownloaderWordsMap[this.appad.card_type][t]);
} catch (e) {}
},
handler: function(t) {
t.current_bytes = t.current_bytes >= 0 ? t.current_bytes : 0;
var e = t.current_bytes / t.total_bytes;
if (e = isNaN(e) ? 0 : Math.floor(100 * e), this.appad.card_type < 3) {
var a = this.getProgress(t.status, e) + GameCard.wordsMap[this.appad.card_type][t.status];
this.$button.html(a || "&nbsp;").attr("status", t.status);
} else this.$button.html(GameCard.wordsMap[this.appad.card_type][t.status] || "&nbsp;"), 
this.$overlay.css({
height: document.body.clientWidth < 375 ? .54 * e : .6 * e + "px"
});
},
prepareData: function(t, e) {
var a = this;
if (t.type = "app", t.item_id = Page.statistics.item_id, t.media_id = Page.author.mediaId, 
t.log_extra = '{"rit":3,"item_id":0,"convert_id":0}', this.statisticsData = {
value: Page.statistics.item_id,
extra: {
card_type: t.card_type,
app_name: encodeURIComponent(t.name),
pkg_name: t.pkg_name,
app_id: t.app_id,
app_category: encodeURIComponent(t.game_type),
media_id: Page.author.mediaId,
item_id: Page.statistics.item_id
}
}, client.isIOS && t.download_url_for_ios) t.detail = t.download_url_for_ios, this.appad = t, 
setTimeout(function() {
a.getInstalledState(0);
}, 0); else {
if (!client.isAndroid || !t.download_url_for_android) return;
t.detail = t.detail ? "sslocal://webview?url=" + encodeURIComponent(t.detail) : t.download_url_for_android, 
this.appad = t, this.getDownloader() ? (this.appad.download_url = t.download_url_for_android, 
this.subscribe()) : ToutiaoJSBridge.call("isAppInstalled", {
pkg_name: t.pkg_name
}, function(t) {
a.getInstalledState(1 == t.installed ? 1 : 0);
});
}
this.buildDOM(), this.bindEvents(), e && $(e).replaceWith(this.$card);
},
buildDOM: function() {
var r = function(obj) {
var __t, __p = "";
with (Array.prototype.join, obj || {}) __p += "", "1" == data.card_type ? __p += '<a class="game-downloader gd1" href="' + (null == (__t = data.detail) ? "" : __t) + '"><img class="gd-icon" src="' + (null == (__t = data.logo) ? "" : __t) + '"><div class="gd-button gd1-btn"></div><div class="gd1-cont"><div class="gd1-cont-name">' + (null == (__t = data.name) ? "" : __t) + '</div><div class="gd1-cont-text">' + (null == (__t = data.game_type) ? "" : __t) + '<span class="gd1-cont-split"></span>' + (null == (__t = data.size) ? "" : __t) + '</div><div class="gd1-cont-text">' + (null == (__t = data.desc) ? "" : __t) + "</div></div></a>" : "2" == data.card_type ? __p += '<a class="game-downloader gd2" href="' + (null == (__t = data.detail) ? "" : __t) + '"><img class="gd2-cover" src="' + (null == (__t = data.banner) ? "" : __t) + '"><div class="gd2-info"><div class="gd-button gd2-btn">&nbsp;</div><div class="gd2-cont"><div class="gd2-cont-name">' + (null == (__t = data.name) ? "" : __t) + '</div><div class="gd2-cont-text">' + (null == (__t = data.game_type) ? "" : __t) + '<span class="gd2-cont-split"></span>' + (null == (__t = data.size) ? "" : __t) + "</div></div></div></a>" : "3" == data.card_type ? __p += '<a class="game-downloader gd3" href="' + (null == (__t = data.detail) ? "" : __t) + '"><div class="gd-icon"><img  src="' + (null == (__t = data.logo) ? "" : __t) + '"  style="border-radius: 5px;"><div class="gd-overlay"></div></div><div class="gd-button gd3-btn"><i>&nbsp;</i><span>&nbsp;</span></div><div class="gd3-cont"><div class="gd3-cont-name pcard-h16 pcard-w1 pcard-bold">' + (null == (__t = data.name) ? "" : __t) + '</div><div class="gd3-cont-text pcard-h12 pcard-w1">' + (null == (__t = data.desc) ? "" : __t) + '</div><div class="gd3-cont-text pcard-h12 pcard-w3">' + (null == (__t = data.game_type) ? "" : __t) + "&nbsp;|&nbsp;" + (null == (__t = data.size) ? "" : __t) + "</div></div></a>" : "4" == data.card_type && (__p += '<a class="game-downloader gd4" href="' + (null == (__t = data.detail) ? "" : __t) + '"><div class="gd-icon"><img src="' + (null == (__t = data.logo) ? "" : __t) + '"  style="border-radius: 5px;"><div class="gd-overlay"></div></div><div class="gd4-cont"><div class="gd4-cont-name pcard-h16 pcard-w1 pcard-bold">' + (null == (__t = data.name) ? "" : __t) + '</div><div class="gd4-cont-text pcard-h12 pcard-w3">' + (null == (__t = data.game_type) ? "" : __t) + "&nbsp;" + (null == (__t = data.size) ? "" : __t) + '</div><div class="gd-button gd4-btn pcard-h12">&nbsp;</div></div></a>'), 
__p += "";
return __p;
};
this.$card = $(r({
data: this.appad
})), this.$button = this.$card.find(".gd-button"), this.$overlay = this.$card.find(".gd-overlay");
},
bindEvents: function() {
var t = this, e = this.statisticsData;
this.$card.on("click", function() {
send_umeng_event(t.appad.tag, "click_detail", e);
}), needCleanDoms.push(this.$card), this.$button.on("click", function(a) {
client.isAndroid && t.getDownloader() ? (a.stopPropagation(), a.preventDefault(), 
ToutiaoJSBridge.call("download_app_ad", {
data: t.appad
})) : 1 == t.installed ? (a.stopPropagation(), a.preventDefault(), send_umeng_event(t.appad.tag, "click_open", e), 
ToutiaoJSBridge.call("openThirdApp", {
pkg_name: t.appad.pkg_name
}, function(t) {
console.info("openThirdApp", t), 0 == t.code && ToutiaoJSBridge.call("toast", {
text: "打开应用失败，请稍后尝试"
});
})) : client.isAndroid && (a.stopPropagation(), a.preventDefault(), location.href = t.appad.download_url_for_android, 
send_umeng_event(t.appad.tag, "click_download", e));
}), needCleanDoms.push(this.$button), sendUmengWhenTargetShown(this.$card.get(0), t.appad.tag, "show", e, !0);
}
};

var canSetContext = !1, globalContent, globalCachedContext = null, needCleanDoms = [], imprProcessQueue = [];

window.Page = {}, window.OldPage = null, window.globalExtras = {};

var AndroidImageProcessorUtil = {
prepareThread: function() {
var t, e = AndroidImageProcessor.$images, a = e.length, n = this.aW, i = 4;
1 === a ? (t = 1, this.threadImageWidth = n, this.threadImageType = "origin") : 2 === a || 4 === a ? (t = 4, 
this.threadImageWidth = Math.floor((n - i) / 2), this.threadImageType = "list400") : (t = 9, 
this.threadImageWidth = Math.floor((n - 2 * i) / 3), this.threadImageType = "list300"), 
$("body").attr({
newimage: "true",
images: t
});
},
buildImageSource: function(t, e, a) {
return AndroidImageProcessorUtil.url_prefix + "getimage/" + t + "/" + e + "/" + AndroidImageProcessorUtil.group_id + "/" + a;
},
buildImageDOMString: function(t, e, a) {
return '<img src="' + t + '" width="' + e + '" height="' + a + '" style="display: none;" onload="appendimg.call(this);" onerror="errorimg.call(this);" />';
},
isElementinViewport: function(t) {
var e = 100, a = t.getBoundingClientRect();
return a.top < 0 ? !0 : (a.top >= 0 && a.left >= 0 && a.top) <= AndroidImageProcessorUtil.iH + e;
},
adjustOriginImageScale: function(t, e) {
var a, n, i = 200, o = 200, r = t / e;
return a = t ? t > AndroidImageProcessorUtil.aW / 2 ? AndroidImageProcessorUtil.aW : t : i, 
n = r ? parseInt(a / r) : o, {
w: a,
h: n
};
},
bindOriginImageLoader: function(t) {
t.getAttribute("ss_href") && (t.setAttribute("href", "javascript:void(0);"), t.addEventListener("click", this.showLargeImageHandler, !1));
},
unbindOriginImageLoader: function(t) {
t.removeEventListener("click", this.showLargeImageHandler, !1), t.getAttribute("ss_href") && t.setAttribute("href", t.getAttribute("ss_href"));
},
showLargeImageHandler: function(t) {
t.preventDefault(), AndroidImageProcessor.showLargeImage(this);
},
toggleGifState: function(t, e) {
if (t && ("gif" === t.getAttribute("type") || "2" === t.getAttribute("type"))) {
var a = t.querySelector(".gif_play");
e ? a || (a = document.createElement("i"), a.className = "gif_play", t.appendChild(a)) : a && a.parentNode.removeChild(a);
}
}
}, AndroidImageProcessor = {
initializeImagePlaceholder: function() {
var t = this, e = [ "origin", "thumb", "none", "list640", "list400", "list300" ];
if (this.$images = $(".image"), AndroidImageProcessorUtil.threadGGSwitch && (AndroidImageProcessorUtil.prepareThread(), 
this.useLazyload = !1, "none" !== this.imageType && (this.imageType = AndroidImageProcessorUtil.threadImageType)), 
AndroidImageProcessorUtil.threadGGSwitch || (console.time("cp"), this.$images.each(function(t, e) {
var a = $(e), n = a.parent();
n.is("p") ? "" !== n.text() ? (console.info("[" + t + "]所在段落有其他内容，分割"), a.wrap('<span class="image-wrap">')) : n.find(".image").length > 0 ? (console.info("[" + t + "]所在段落有其他图片，应当分割"), 
a.wrap('<span class="image-wrap">')) : (console.info("[" + t + "]正确"), n.addClass("image-wrap")) : (console.info("[" + t + "]外层无段落，加包裹"), 
a.wrap('<p class="image-wrap">'));
}), console.timeEnd("cp")), !this.useLazyload && this.$images.length > 10 && (this.useLazyload = !0, 
console.info("当图片超过10个时强制开启lazyload")), "origin" !== this.imageType && !AndroidImageProcessorUtil.threadGGSwitch && this.$images.length > 0) {
var a = $('<div class="toggle-img-con">');
a.append('<a class="toggle-img" id="toggle-img" href="javascript:;">显示大图</a>'), 
a.on("click", function() {
$(this).css("visibility", "hidden"), t.showAllOriginImages();
}), this.$images.eq(0).before(a), console.info("非大图模式时，在第一张图前加入［显示大图］按钮");
}
-1 !== e.indexOf(this.imageType) && (console.time("recalculateImageSize"), this.$images.each(function(e, a) {
var n, i, o = a.getAttribute("href") || "", r = a.getAttribute("zip_src_path") || "", s = AndroidImageProcessorUtil.buildImageSource(t.imageType, r, e), l = AndroidImageProcessorUtil.adjustOriginImageScale(a.getAttribute("width"), a.getAttribute("height")), c = AndroidImageProcessorUtil.adjustOriginImageScale(a.getAttribute("thumb_width"), a.getAttribute("thumb_height"));
if (a.setAttribute("s_width", l.w), a.setAttribute("s_height", l.h), a.setAttribute("t_width", c.w), 
a.setAttribute("t_width", c.h), a.setAttribute("ss_index", e), o && 0 === o.indexOf("bytedance://large_image") && a.setAttribute("ss_href", o), 
a.classList.remove("offline"), a.classList.add("loading"), AndroidImageProcessorUtil.threadGGSwitch) {
var d = a.getAttribute("height"), u = a.getAttribute("width");
n = i = AndroidImageProcessorUtil.threadImageWidth, n == AndroidImageProcessorUtil.aW && (i = d * n / u);
} else "thumb" === t.imageType ? (n = c.w, i = c.h, a.classList.add("thumb"), AndroidImageProcessorUtil.bindOriginImageLoader(a)) : (n = l.w, 
i = l.h);
a.style.width = n + "px", a.style.height = i + "px", t.useLazyload ? (a.setAttribute("lazy_src", s), 
a.setAttribute("lazy_w", n), a.setAttribute("lazy_h", i)) : a.innerHTML = AndroidImageProcessorUtil.buildImageDOMString(s, n, i), 
AndroidImageProcessorUtil.threadGGSwitch ? "gif" === a.getAttribute("type") || "2" === a.getAttribute("type") ? $(a).append('<i class="forum-image-subscript">GIF</i>') : (u > 3 * d || d > 3 * u) && 1 !== t.$images.length && $(a).append('<i class="forum-image-subscript">长图</i>') : "thumb" === t.imageType && AndroidImageProcessorUtil.toggleGifState(a, !0), 
$(a).on("click", function(t) {
var e = a.getAttribute("href"), n = a.getAttribute("redirect-link");
if ("string" == typeof n && n.indexOf("sslocal") > -1) t.preventDefault(), location.href = n; else if (e.indexOf("bytedance://large_image") > -1) {
e.indexOf("&left=") > -1 && (e = e.substring(0, e.indexOf("&left=")));
var i = $(a).offset(), o = "&left=" + i.left + "&top=" + i.top + "&width=" + i.width + "&height=" + i.height;
a.setAttribute("href", e + o), AndroidImageProcessorUtil.threadGGSwitch && send_umeng_event("talk_detail", "picture_click", Page.forumStatisticsParams);
}
});
}), console.timeEnd("recalculateImageSize"), console.time("ll"), this.useLazyload && this.initializeImageLazyload(), 
console.timeEnd("ll"), AndroidImageProcessorUtil.threadGGSwitch || send_umeng_event("detail", "article_image_type", {
extra: {
image_type: this.imageType
}
}));
},
onNativeImageLoaded: function(t, e, a) {
if (console.info("[onNativeImageLoaded]", t, e, a), !(0 > t || t >= AndroidImageProcessor.$images.length)) {
AndroidImageProcessor.samePicturesCheckCache.push(t), AndroidImageProcessor.checkSamePictures(t, e, a);
var n = AndroidImageProcessor.$images.get(t), i = n.querySelectorAll("img"), o = null;
if (i.length > 0 && (o = i[0]), o) {
var r = null;
i.length > 1 && (r = i[1]);
var s = n.getAttribute("zip_src_path");
if (r) {
if (a) if (e) {
var l = AndroidImageProcessorUtil.url_prefix + "image/origin/" + s;
r.setAttribute("src", l), console.info("m1", l);
} else n.removeChild(r); else if (e && o.src.indexOf("/getimage/") > 0) {
var l = AndroidImageProcessorUtil.url_prefix + "image/thumb/" + s;
o.setAttribute("src", l);
}
} else if (!(o.src.indexOf("/getimage/") < 0)) {
var c;
c = o.src.indexOf("/getimage/origin/") > 0 ? "image/origin/" : o.src.indexOf("/getimage/thumb/") > 0 ? "image/thumb/" : o.src.indexOf("/getimage/" + AndroidImageProcessorUtil.threadThumbType + "/") > 0 ? "image/" + AndroidImageProcessorUtil.threadThumbType + "/" : a ? "image/origin/" : "image/thumb/";
var l = AndroidImageProcessorUtil.url_prefix + c + s;
e ? o.setAttribute("src", l) : n.classList.remove("loading");
}
}
}
},
checkSamePictures: function(t, e, a) {
var n = this, i = this.$images.eq(t), o = i.attr("href"), r = o.match(/url=[^&]*/);
r && (r = r[0], this.$images.each(function(i, o) {
var s = o.getAttribute("href");
-1 === n.samePicturesCheckCache.indexOf(i) && i !== t && s.indexOf(r) > -1 && n.onNativeImageLoaded(i, e, a);
}));
},
showAllOriginImages: function() {
this.changeImageLoadType("origin", this.useLazyload), this.useLazyload && this.initializeImageLazyload(), 
sendBytedanceRequest("toggle_image?action=show");
},
changeImageLoadType: function(t, e) {
this.$images.each(function(a, n) {
var i = n.getAttribute("zip_src_path"), o = AndroidImageProcessorUtil.buildImageSource(t, i, a), r = n.getAttribute("s_height"), s = n.getAttribute("s_width");
n.style.width = s + "px", n.style.height = r + "px", e && n.getAttribute("lazy_src") ? (n.setAttribute("lazy_src", o), 
n.setAttribute("lazy_w", s), n.setAttribute("lazy_h", r)) : n.innerHTML = AndroidImageProcessorUtil.buildImageDOMString(o, s, r);
});
},
initializeImageLazyload: function() {
console.info("initializeImageLazyload"), AndroidImageProcessor.lazyloadHolders = Array.prototype.slice.call(document.querySelectorAll("[lazy_src]")), 
this.pollImages(), $(document).off("scroll", this.pollImages), $(document).on("scroll", this.pollImages);
},
pollImages: function() {
clearTimeout(AndroidImageProcessor.pollImagesTimer), AndroidImageProcessor.pollImagesTimer = setTimeout(AndroidImageProcessor.pollImagesHandler, 100);
},
pollImagesHandler: function() {
return console.info("pollImagesing..."), Array.isArray(AndroidImageProcessor.lazyloadHolders) && 0 !== AndroidImageProcessor.lazyloadHolders.length ? (AndroidImageProcessor.lazyloadHolders.forEach(function(t) {
if (AndroidImageProcessorUtil.isElementinViewport(t)) {
var e = t.getAttribute("lazy_w"), a = t.getAttribute("lazy_h"), n = t.getAttribute("lazy_src");
t.innerHTML = t.innerHTML + AndroidImageProcessorUtil.buildImageDOMString(n, e, a), 
t.removeAttribute("lazy_src");
}
}), void (AndroidImageProcessor.lazyloadHolders = Array.prototype.slice.call(document.querySelectorAll("[lazy_src]")))) : void $(document).off("scroll", AndroidImageProcessor.pollImages);
},
showLargeImage: function(t, e) {
var a = t.classList.contains("offline");
a && (t.classList.remove("thumb"), t.classList.remove("offline")), t.classList.add("loading");
var n = t.querySelectorAll("img");
if (!(n.length > 1)) {
1 === n.length && 0 === n[0].naturalWidth && t.removeChild(n[0]);
var i = t.getAttribute("ss_index"), o = t.getAttribute("zip_src_path");
if (AndroidImageProcessorUtil.threadGGSwitch && AndroidImageProcessor.$images.length > 1) {
!e && (location.href = t.getAttribute("ss_href"));
var r = AndroidImageProcessorUtil.buildImageSource(AndroidImageProcessorUtil.threadThumbType, o, i);
} else var r = AndroidImageProcessorUtil.buildImageSource("origin", o, i);
var s = document.createElement("div");
s.innerHTML = AndroidImageProcessorUtil.buildImageDOMString(r, 1, 1);
var l = s.firstElementChild;
if (s.removeChild(l), t.appendChild(l), !a) {
var c = document.createElement("i");
c.className = "spinner", t.appendChild(c);
}
setTimeout(function() {
sendBytedanceRequest((a ? "show_image" : "origin_image") + "?index=" + i);
}, 1e3), AndroidImageProcessorUtil.unbindOriginImageLoader(t);
}
},
onError: function() {
var t = this.parentNode;
if (t.classList.remove("loading"), 0 === this.src.indexOf(AndroidImageProcessorUtil.url_prefix + "getimage/none/")) t.classList.add("offline"), 
AndroidImageProcessorUtil.bindOriginImageLoader(t); else if (0 === this.src.indexOf(AndroidImageProcessorUtil.url_prefix + "image/")) {
var e = t.firstElementChild, a = t.querySelector(".spinner");
e && "IMG" == e.tagName && e != this && a && (console.info("p是img还不是<img>???"), 
a.parentNode.removeChild(a)), t.classList.remove("offline");
}
},
onLoad: function() {
var t = this.parentNode, e = t.getAttribute("s_width"), a = t.getAttribute("s_height"), n = this.naturalWidth, i = this.naturalHeight, o = !1;
if (AndroidImageProcessorUtil.threadGGSwitch) ; else if (n == t.getAttribute("width") && i == t.getAttribute("height")) o = !0, 
this.getAttribute("width") != e && (console.info("[appendimg_fir]", e, a), t.style.width = e + "px", 
t.style.height = a + "px"), t.classList.remove("thumb"), t.classList.remove("offline"), 
AndroidImageProcessorUtil.unbindOriginImageLoader(t); else if (n > 0 && i > 0) {
var r = AndroidImageProcessorUtil.adjustOriginImageScale(n, i);
console.info("[appendimg_sec]", r.w, r.h), t.style.width = r.w + "px", t.style.height = r.h + "px";
} else t.style.width = "120px", t.style.height = "120px";
o ? AndroidImageProcessorUtil.toggleGifState(t, !1) : this.src.indexOf("getimage/none") > 0 && AndroidImageProcessorUtil.bindOriginImageLoader(t), 
this.style.display = "block";
var s = t.firstElementChild;
s && "IMG" == s.tagName && s != this && t.removeChild(s);
var l = t.querySelector(".spinner");
l && l.parentNode.removeChild(l), t.classList.remove("loading");
}
};

window.image_load_cb = AndroidImageProcessor.onNativeImageLoaded, window.errorimg = AndroidImageProcessor.onError, 
window.appendimg = AndroidImageProcessor.onLoad, function() {
bindStatisticsEvents(), bindStatisticsEvents23(), tellClientContentSize(), checkHeaderDisplayed();
}(), !function(t) {
function e(a) {
if (n[a]) return n[a].exports;
var i = n[a] = {
i: a,
l: !1,
exports: {}
};
return t[a].call(i.exports, i, i.exports, e), i.l = !0, i.exports;
}
var a = window.webpackJsonp;
window.webpackJsonp = function(e, n, o) {
for (var r, s, l = 0, c = []; l < e.length; l++) s = e[l], i[s] && c.push(i[s][0]), 
i[s] = 0;
for (r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
for (a && a(e, n, o); c.length; ) c.shift()();
};
var n = {}, i = {
1: 0
};
e.e = function(t) {
function a() {
s.onerror = s.onload = null, clearTimeout(l);
var e = i[t];
0 !== e && (e && e[1](new Error("Loading chunk " + t + " failed.")), i[t] = void 0);
}
var n = i[t];
if (0 === n) return new Promise(function(t) {
t();
});
if (n) return n[2];
var o = new Promise(function(e, a) {
n = i[t] = [ e, a ];
});
n[2] = o;
var r = document.getElementsByTagName("head")[0], s = document.createElement("script");
s.type = "text/javascript", s.charset = "utf-8", s.async = !0, s.timeout = 12e4, 
e.nc && s.setAttribute("nonce", e.nc), s.src = e.p + "" + ({
0: "component"
}[t] || t) + "." + {
0: "4b374ebf8e2fbe227198"
}[t] + ".js";
var l = setTimeout(a, 12e4);
return s.onerror = s.onload = a, r.appendChild(s), o;
}, e.m = t, e.c = n, e.i = function(t) {
return t;
}, e.d = function(t, a, n) {
e.o(t, a) || Object.defineProperty(t, a, {
configurable: !1,
enumerable: !0,
get: n
});
}, e.n = function(t) {
var a = t && t.__esModule ? function() {
return t.default;
} : function() {
return t;
};
return e.d(a, "a", a), a;
}, e.o = function(t, e) {
return Object.prototype.hasOwnProperty.call(t, e);
}, e.p = "https://s2.pstatp.com/pgc/v2/resource/card/", e.oe = function(t) {
throw console.error(t), t;
}, e(e.s = 20);
}([ function(t, e, a) {
"use strict";
Object.defineProperty(e, "__esModule", {
value: !0
}), function(t) {
function n() {
return null;
}
function i(t) {
var e = t.nodeName, a = t.attributes;
t.attributes = {}, e.defaultProps && w(t.attributes, e.defaultProps), a && w(t.attributes, a);
}
function o(t, e) {
var a, n, i;
if (e) {
for (i in e) if (a = H.test(i)) break;
if (a) {
n = t.attributes = {};
for (i in e) e.hasOwnProperty(i) && (n[H.test(i) ? i.replace(/([A-Z0-9])/, "-$1").toLowerCase() : i] = e[i]);
}
}
}
function r(t, e, n) {
var i = e && e._preactCompatRendered && e._preactCompatRendered.base;
i && i.parentNode !== e && (i = null), i || (i = e.children[0]);
for (var o = e.childNodes.length; o--; ) e.childNodes[o] !== i && e.removeChild(e.childNodes[o]);
var r = a.i(B.render)(t, e, i);
return e && (e._preactCompatRendered = r && (r._component || {
base: r
})), "function" == typeof n && n(), r && r._component || r;
}
function s(t, e, n, i) {
var o = a.i(B.h)(Q, {
context: t.context
}, e), s = r(o, n);
return i && i(s), s._component || s.base;
}
function l(t) {
var e = t._preactCompatRendered && t._preactCompatRendered.base;
return !(!e || e.parentNode !== t || (a.i(B.render)(a.i(B.h)(n), t, e), 0));
}
function c(t) {
return f.bind(null, t);
}
function d(t, e) {
for (var a = e || 0; a < t.length; a++) {
var n = t[a];
Array.isArray(n) ? d(n) : n && "object" == typeof n && !g(n) && (n.props && n.type || n.attributes && n.nodeName || n.children) && (t[a] = f(n.type || n.nodeName, n.props || n.attributes, n.children));
}
}
function u(t) {
return "function" == typeof t && !(t.prototype && t.prototype.render);
}
function _(t) {
return P({
displayName: t.displayName || t.name,
render: function() {
return t(this.props, this.context);
}
});
}
function p(t) {
var e = t[W];
return e ? !0 === e ? t : e : (e = _(t), Object.defineProperty(e, W, {
configurable: !0,
value: !0
}), e.displayName = t.displayName, e.propTypes = t.propTypes, e.defaultProps = t.defaultProps, 
Object.defineProperty(t, W, {
configurable: !0,
value: e
}), e);
}
function f() {
for (var t = [], e = arguments.length; e--; ) t[e] = arguments[e];
return d(t, 2), h(B.h.apply(void 0, t));
}
function h(t) {
t.preactCompatNormalized = !0, y(t), u(t.nodeName) && (t.nodeName = p(t.nodeName));
var e = t.attributes.ref, a = e && typeof e;
return !K || "string" !== a && "number" !== a || (t.attributes.ref = v(e, K)), b(t), 
t;
}
function m(t, e) {
for (var n = [], i = arguments.length - 2; i-- > 0; ) n[i] = arguments[i + 2];
if (!g(t)) return t;
var o = t.attributes || t.props, r = a.i(B.h)(t.nodeName || t.type, o, t.children || o && o.children), s = [ r, e ];
return n && n.length ? s.push(n) : e && e.children && s.push(e.children), h(B.cloneElement.apply(void 0, s));
}
function g(t) {
return t && (t instanceof q || t.$$typeof === V);
}
function v(t, e) {
return e._refProxies[t] || (e._refProxies[t] = function(a) {
e && e.refs && (e.refs[t] = a, null === a && (delete e._refProxies[t], e = null));
});
}
function b(t) {
var e = t.nodeName, a = t.attributes;
if (a && "string" == typeof e) {
var n = {};
for (var i in a) n[i.toLowerCase()] = i;
if (n.ondoubleclick && (a.ondblclick = a[n.ondoubleclick], delete a[n.ondoubleclick]), 
n.onchange && ("textarea" === e || "input" === e.toLowerCase() && !/^fil|che|rad/i.test(a.type))) {
var o = n.oninput || "oninput";
a[o] || (a[o] = $([ a[o], a[n.onchange] ]), delete a[n.onchange]);
}
}
}
function y(t) {
var e = t.attributes;
if (e) {
var a = e.className || e.class;
a && (e.className = a);
}
}
function w(t, e) {
for (var a in e) e.hasOwnProperty(a) && (t[a] = e[a]);
return t;
}
function x(t, e) {
for (var a in t) if (!(a in e)) return !0;
for (var n in e) if (t[n] !== e[n]) return !0;
return !1;
}
function k(t) {
return t && t.base || t;
}
function S() {}
function P(t) {
function e(t, e) {
A(this), j.call(this, t, e, F), E.call(this, t, e);
}
return t = w({
constructor: e
}, t), t.mixins && C(t, T(t.mixins)), t.statics && w(e, t.statics), t.propTypes && (e.propTypes = t.propTypes), 
t.defaultProps && (e.defaultProps = t.defaultProps), t.getDefaultProps && (e.defaultProps = t.getDefaultProps()), 
S.prototype = j.prototype, e.prototype = w(new S(), t), e.displayName = t.displayName || "Component", 
e;
}
function T(t) {
for (var e = {}, a = 0; a < t.length; a++) {
var n = t[a];
for (var i in n) n.hasOwnProperty(i) && "function" == typeof n[i] && (e[i] || (e[i] = [])).push(n[i]);
}
return e;
}
function C(t, e) {
for (var a in e) e.hasOwnProperty(a) && (t[a] = $(e[a].concat(t[a] || Z), "getDefaultProps" === a || "getInitialState" === a || "getChildContext" === a));
}
function A(t) {
for (var e in t) {
var a = t[e];
"function" != typeof a || a.__bound || J.hasOwnProperty(e) || ((t[e] = a.bind(t)).__bound = !0);
}
}
function I(t, e, a) {
return "string" == typeof e && (e = t.constructor.prototype[e]), "function" == typeof e ? e.apply(t, a) : void 0;
}
function $(t, e) {
return function() {
for (var a, n = arguments, i = this, o = 0; o < t.length; o++) {
var r = I(i, t[o], n);
if (e && null != r) {
a || (a = {});
for (var s in r) r.hasOwnProperty(s) && (a[s] = r[s]);
} else void 0 !== r && (a = r);
}
return a;
};
}
function E(t, e) {
N.call(this, t, e), this.componentWillReceiveProps = $([ N, this.componentWillReceiveProps || "componentWillReceiveProps" ]), 
this.render = $([ N, O, this.render || "render", L ]);
}
function N(t) {
if (t) {
var e = t.children;
if (e && Array.isArray(e) && 1 === e.length && (t.children = e[0], t.children && "object" == typeof t.children && (t.children.length = 1, 
t.children[0] = t.children)), G) {
var a = "function" == typeof this ? this : this.constructor, n = this.propTypes || a.propTypes, i = this.displayName || a.name;
n && D.a.checkPropTypes(n, t, "prop", i);
}
}
}
function O() {
K = this;
}
function L() {
K === this && (K = null);
}
function j(t, e, a) {
B.Component.call(this, t, e), this.state = this.getInitialState ? this.getInitialState() : {}, 
this.refs = {}, this._refProxies = {}, a !== F && E.call(this, t, e);
}
function M(t, e) {
j.call(this, t, e);
}
a.d(e, "version", function() {
return z;
}), a.d(e, "DOM", function() {
return ee;
}), a.d(e, "Children", function() {
return te;
}), a.d(e, "render", function() {
return r;
}), a.d(e, "createClass", function() {
return P;
}), a.d(e, "createFactory", function() {
return c;
}), a.d(e, "createElement", function() {
return f;
}), a.d(e, "cloneElement", function() {
return m;
}), a.d(e, "isValidElement", function() {
return g;
}), a.d(e, "findDOMNode", function() {
return k;
}), a.d(e, "unmountComponentAtNode", function() {
return l;
}), a.d(e, "Component", function() {
return j;
}), a.d(e, "PureComponent", function() {
return M;
}), a.d(e, "unstable_renderSubtreeIntoContainer", function() {
return s;
});
var U = a(18), D = a.n(U), B = a(15);
a.n(B), a.d(e, "PropTypes", function() {
return D.a;
});
var z = "15.1.0", R = "a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "), V = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103, W = "undefined" != typeof Symbol ? Symbol.for("__preactCompatWrapper") : "__preactCompatWrapper", J = {
constructor: 1,
render: 1,
shouldComponentUpdate: 1,
componentWillReceiveProps: 1,
componentWillUpdate: 1,
componentDidUpdate: 1,
componentWillMount: 1,
componentDidMount: 1,
componentWillUnmount: 1,
componentDidUnmount: 1
}, H = /^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vert|word|writing|x)[A-Z]/, F = {}, G = void 0 === t || !a.i({
NODE_ENV: "production"
}) || !1, q = a.i(B.h)("a", null).constructor;
q.prototype.$$typeof = V, q.prototype.preactCompatUpgraded = !1, q.prototype.preactCompatNormalized = !1, 
Object.defineProperty(q.prototype, "type", {
get: function() {
return this.nodeName;
},
set: function(t) {
this.nodeName = t;
},
configurable: !0
}), Object.defineProperty(q.prototype, "props", {
get: function() {
return this.attributes;
},
set: function(t) {
this.attributes = t;
},
configurable: !0
});
var Y = B.options.event;
B.options.event = function(t) {
return Y && (t = Y(t)), t.persist = Object, t.nativeEvent = t, t;
};
var X = B.options.vnode;
B.options.vnode = function(t) {
if (!t.preactCompatUpgraded) {
t.preactCompatUpgraded = !0;
var e = t.nodeName, a = t.attributes = w({}, t.attributes);
"function" == typeof e ? (!0 === e[W] || e.prototype && "isReactComponent" in e.prototype) && (t.children && "" === String(t.children) && (t.children = void 0), 
t.children && (a.children = t.children), t.preactCompatNormalized || h(t), i(t)) : (t.children && "" === String(t.children) && (t.children = void 0), 
t.children && (a.children = t.children), a.defaultValue && (a.value || 0 === a.value || (a.value = a.defaultValue), 
delete a.defaultValue), o(t, a));
}
X && X(t);
};
var Q = function() {};
Q.prototype.getChildContext = function() {
return this.props.context;
}, Q.prototype.render = function(t) {
return t.children[0];
};
for (var K, Z = [], te = {
map: function(t, e, a) {
return null == t ? null : (t = te.toArray(t), a && a !== t && (e = e.bind(a)), t.map(e));
},
forEach: function(t, e, a) {
return null == t ? null : (t = te.toArray(t), a && a !== t && (e = e.bind(a)), void t.forEach(e));
},
count: function(t) {
return t && t.length || 0;
},
only: function(t) {
if (t = te.toArray(t), 1 !== t.length) throw new Error("Children.only() expects only one child.");
return t[0];
},
toArray: function(t) {
return null == t ? [] : Array.isArray && Array.isArray(t) ? t : Z.concat(t);
}
}, ee = {}, ae = R.length; ae--; ) ee[R[ae]] = c(R[ae]);
w(j.prototype = new B.Component(), {
constructor: j,
isReactComponent: {},
replaceState: function(t, e) {
var a = this;
this.setState(t, e);
for (var n in a.state) n in t || delete a.state[n];
},
getDOMNode: function() {
return this.base;
},
isMounted: function() {
return !!this.base;
}
}), S.prototype = j.prototype, M.prototype = new S(), M.prototype.isPureReactComponent = !0, 
M.prototype.shouldComponentUpdate = function(t, e) {
return x(this.props, t) || x(this.state, e);
};
var ne = {
version: z,
DOM: ee,
PropTypes: D.a,
Children: te,
render: r,
createClass: P,
createFactory: c,
createElement: f,
cloneElement: m,
isValidElement: g,
findDOMNode: k,
unmountComponentAtNode: l,
Component: j,
PureComponent: M,
unstable_renderSubtreeIntoContainer: s
};
e.default = ne;
}.call(e, a(16));
}, function() {}, function(t, e) {
"use strict";
function a(t, e) {
if (e(t), t.firstChild) {
var n = t.firstChild;
if (n) do a(n, e); while (n = n.nextSibling);
}
}
function n(t) {
for (var e = {}, a = 0, n = t.length; n > a; a++) e[t[a].name] = t[a].value;
return e;
}
function i(t) {
for (var e = {}, a = t.attributes, n = t.dataset, i = 0, o = a.length; o > i; i++) "class" !== a[i].name && (e[a[i].name] = a[i].value);
for (var i in n) e[i] = n[i];
return e;
}
function o(t) {
t = t.toLowerCase();
var e = /\b(\w)|\s(\w)/g;
return t.replace(e, function(t) {
return t.toUpperCase();
});
}
function r(t) {
var e = t % 60;
return parseInt(t / 60) + ":" + (10 > e ? "0" + e : e);
}
Object.defineProperty(e, "__esModule", {
value: !0
}), e.default = {
map: a,
attr: n,
buildAttrs: i,
firstUpper: o,
formatTime: r
};
}, function(t, e, a) {
"use strict";
var n = a(11), i = function(t) {
return t && t.__esModule ? t : {
"default": t
};
}(n);
!function() {
pgcEvent.on("card-render", function() {
var t = {};
document.querySelector("body"), i.default.init({
match: /^(tt-|pre)/i,
text: /^{!--.*--}/,
context: t
}).render(this);
});
}(), window.ttCard = i.default || {};
}, function(t, e, a) {
"use strict";
function n(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
}
function i(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e;
}
function o(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
}
Object.defineProperty(e, "__esModule", {
value: !0
});
var r = function() {
function t(t, e) {
for (var a = 0; a < e.length; a++) {
var n = e[a];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), 
Object.defineProperty(t, n.key, n);
}
}
return function(e, a, n) {
return a && t(e.prototype, a), n && t(e, n), e;
};
}(), s = a(0), l = function(t) {
return t && t.__esModule ? t : {
"default": t
};
}(s), c = function(t) {
function e(t) {
n(this, e);
var a = i(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t));
return a.play.bind(a), a.pause.bind(a), a;
}
return o(e, t), r(e, [ {
key: "play",
value: function() {
this.audio.play();
}
}, {
key: "pause",
value: function() {
this.audio.pause();
}
}, {
key: "render",
value: function() {
var t = this;
return l.default.createElement("audio", {
autoPlay: this.props.autoPlay,
className: "audio-player " + this.props.className,
controls: this.props.controls,
loop: this.props.loop,
muted: this.props.muted,
onPlay: this.props.onPlay,
preload: this.props.preload,
ref: function(e) {
t.audio = e;
},
src: this.props.src,
style: this.props.style
});
}
}, {
key: "componentDidMount",
value: function() {
var t = this, e = this.audio;
e.addEventListener("error", function(e) {
t.props.onError(e);
}), e.addEventListener("canplay", function(e) {
t.props.onCanPlay(e);
}), e.addEventListener("canplaythrough", function(e) {
t.props.onCanPlayThrough(e);
}), e.addEventListener("play", function(e) {
t.setListenTrack(), t.props.onPlay(e);
}), e.addEventListener("abort", function(e) {
t.clearListenTrack(), t.props.onAbort(e);
}), e.addEventListener("ended", function(e) {
t.clearListenTrack(), t.props.onEnded(e);
}), e.addEventListener("pause", function(e) {
t.clearListenTrack(), t.props.onPause(e);
}), e.addEventListener("seeked", function(e) {
t.clearListenTrack(), t.props.onSeeked(e);
});
}
}, {
key: "setListenTrack",
value: function() {
var t = this;
if (!this.listenTracker) {
var e = this.props.listenInterval;
this.listenTracker = setInterval(function() {
t.props.onListen(t.audio.currentTime);
}, e);
}
}
}, {
key: "clearListenTrack",
value: function() {
this.listenTracker && (clearInterval(this.listenTracker), this.listenTracker = null);
}
} ]), e;
}(s.Component);
c.defaultProps = {
autoPlay: !1,
children: null,
className: "",
controls: !1,
listenInterval: 3e3,
loop: !1,
muted: !1,
onAbort: function() {},
onCanPlay: function() {},
onCanPlayThrough: function() {},
onEnded: function() {},
onError: function() {},
onListen: function() {},
onPause: function() {},
onPlay: function() {},
onSeeked: function() {},
preload: "auto",
src: null
}, e.default = c;
}, function(t, e, a) {
"use strict";
function n(t) {
return t && t.__esModule ? t : {
"default": t
};
}
function i(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
}
function o(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e;
}
function r(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
}
Object.defineProperty(e, "__esModule", {
value: !0
});
var s = function() {
function t(t, e) {
for (var a = 0; a < e.length; a++) {
var n = e[a];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), 
Object.defineProperty(t, n.key, n);
}
}
return function(e, a, n) {
return a && t(e.prototype, a), n && t(e, n), e;
};
}(), l = a(0), c = n(l), d = a(4), u = n(d), _ = a(14), p = n(_);
a(1);
var f = a(2), h = n(f), m = function(t) {
function e(t) {
i(this, e);
var a = o(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t));
return a.state = {
playing: !1,
progress: 0,
audioSrc: "",
duration: 0
}, a;
}
return r(e, t), s(e, [ {
key: "control",
value: function() {
this.state.playing ? this.refs.player.pause() : this.refs.player.play();
}
}, {
key: "progress",
value: function(t) {
var e = this.props.time;
0 == parseInt(e) && (e = this.state.duration);
var a = Math.ceil(100 * t / e) + "%";
this.setState({
progress: a
});
}
}, {
key: "onPlay",
value: function() {
this.setState({
playing: !0,
duration: this.refs.player.audio.duration
});
for (var t in e.audioList) t !== this.props.id && e.audioList[t].pause();
send_umeng_event && send_umeng_event("sound", "detail_play", {
value: Page.statistics.item_id,
extra: {
sound_id: this.props.id
}
});
}
}, {
key: "onPause",
value: function() {
this.setState({
playing: !1
});
}
}, {
key: "onEnded",
value: function() {
this.setState({
playing: !1,
progress: 0
}), this.refs.player.audio.currentTime = 0;
}
}, {
key: "onError",
value: function() {}
}, {
key: "render",
value: function() {
var t = this, e = this.props, a = e.title, n = e.time, i = e.content, o = (e.id, 
this.state), r = o.playing, s = o.progress, l = o.audioSrc;
return c.default.createElement("div", {
className: r ? "musicplayer playing" : "musicplayer not-playing",
onClick: function() {
return t.control();
}
}, c.default.createElement("div", {
className: "music-state"
}, c.default.createElement("div", {
className: "music-info"
}, c.default.createElement("span", {
className: "music-name"
}, a), c.default.createElement("span", {
className: "music-time"
}, h.default.formatTime(n))), c.default.createElement("div", {
className: "music-musician"
}, i)), c.default.createElement("div", {
className: "progressbar",
style: {
width: s
}
}), c.default.createElement(u.default, {
ref: "player",
src: l,
onError: function() {
return t.onError();
},
onListen: function(e) {
return t.progress(e);
},
onPause: function() {
return t.onPause();
},
onPlay: function(e) {
return t.onPlay(e);
},
onEnded: function(e) {
return t.onEnded(e);
}
}));
}
}, {
key: "getAudioSourceById",
value: function(t) {
var e = this;
p.default("http://i.snssdk.com/audio/urls/1/toutiao/mp4/" + t).then(function(t) {
return t.status >= 400 && ToutiaoJSBridge.call("toast", {
text: "音频获取失败，请重试",
icon_type: "icon_error"
}), t.json();
}).then(function(t) {
return atob(t.data.audio_list.audio_1.main_url.replace(/\n/gi, ""));
}).then(function(t) {
e.setState({
audioSrc: t
});
});
}
}, {
key: "componentDidMount",
value: function() {
this.getAudioSourceById(this.props.id), e.audioList[this.props.id] = this.refs.player;
}
}, {
key: "componentWillUnmount",
value: function() {
e.audioList = null;
}
} ]), e;
}(l.Component);
m.audioList = {}, e.default = m;
}, function(t, e, a) {
"use strict";
function n(t, e) {
var a = {};
for (var n in t) e.indexOf(n) >= 0 || Object.prototype.hasOwnProperty.call(t, n) && (a[n] = t[n]);
return a;
}
function i(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
}
function o(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e;
}
function r(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
}
Object.defineProperty(e, "__esModule", {
value: !0
});
var s = function() {
function t(t, e) {
for (var a = 0; a < e.length; a++) {
var n = e[a];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), 
Object.defineProperty(t, n.key, n);
}
}
return function(e, a, n) {
return a && t(e.prototype, a), n && t(e, n), e;
};
}(), l = a(0), c = function(t) {
return t && t.__esModule ? t : {
"default": t
};
}(l);
a(1);
var d = function(t) {
function e(t) {
i(this, e);
var a = o(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t));
return a.state = {
status: "idle",
installed: 0,
progress: 0
}, a;
}
return r(e, t), s(e, [ {
key: "hasDownloader",
value: function() {
return client.isNewsArticleVersionNoLessThan("6.1.4");
}
}, {
key: "setInstalledState",
value: function(t) {
this.setState({
installed: t
});
}
}, {
key: "isInstalled",
value: function() {
var t = this;
ToutiaoJSBridge.call("isAppInstalled", {
pkg_name: this.props.pkg_name
}, function(e) {
t.setInstalledState(1 == e.installed ? 1 : 0);
});
}
}, {
key: "renderProgress",
value: function() {
var t = void 0, e = this.state.progress;
return 50 >= e ? (t = "rotate(" + (180 + 3.6 * e) + "deg)", c.default.createElement("div", {
className: "progress-ring"
}, c.default.createElement("i", {
className: "left"
}, c.default.createElement("i", {
style: {
WebkitTransform: t,
transform: t
}
})))) : (t = "rotate(" + (3.6 * e - 360) + "deg)", c.default.createElement("div", {
className: "progress-ring"
}, c.default.createElement("i", {
className: "left"
}, c.default.createElement("i", null)), c.default.createElement("i", {
className: "right"
}, c.default.createElement("i", {
style: {
WebkitTransform: t,
transform: t
}
}))));
}
}, {
key: "renderIcon",
value: function(t) {
return c.default.Children.only("download_active" === t ? c.default.createElement("div", null, this.renderProgress(), "暂停") : "download_paused" === t ? c.default.createElement("div", null, this.renderProgress(), "继续") : "download_finished" === t ? c.default.createElement("div", null, "安装") : c.default.createElement("div", null, c.default.createElement("i", null, ""), "下载"));
}
}, {
key: "renderButton",
value: function(t, e) {
var a = this, n = 1 == t ? "gd-button gd1-btn iconfont" : "gd-button gd2-btn iconfont";
return 1 == this.state.installed ? c.default.createElement("div", {
className: n,
onClick: function(t) {
return a.handleButton(t);
}
}, c.default.createElement("i", null, ""), "打开") : c.default.createElement("div", {
className: n,
onClick: function(t) {
return a.handleButton(t);
}
}, this.renderIcon(e));
}
}, {
key: "render",
value: function() {
var t = this, e = this.props, a = e.logo, n = e.banner, i = e.name, o = e.game_type, r = e.size, s = e.desc, l = e.detail, d = e.download_url_for_ios, u = (e.pkg_name, 
e.download_url_for_android), _ = this.state.status, p = void 0;
if (a && (p = 1), n && (p = 2), client.isIOS && d) l = d, setTimeout(function() {
return t.setInstalledState(0);
}, 0); else {
if (!client.isAndroid || !u) return null;
l = l ? "sslocal://webview?url=" + encodeURIComponent(l) : u;
}
return 1 == p ? c.default.createElement("a", {
className: "game-downloader gd1",
onClick: function() {
return t.log("detail");
},
href: l
}, c.default.createElement("img", {
className: "gd-icon",
src: a
}), " ", this.renderButton(p, _), c.default.createElement("div", {
className: "gd1-cont"
}, c.default.createElement("div", {
className: "gd1-cont-name"
}, i), c.default.createElement("div", {
className: "gd1-cont-text"
}, o, " ", o ? c.default.createElement("span", {
className: "gd1-cont-split"
}) : "", r), c.default.createElement("div", {
className: "gd1-cont-text"
}, s))) : 2 == p ? c.default.createElement("a", {
className: "game-downloader gd2",
onClick: function() {
return t.log("detail");
},
href: l
}, c.default.createElement("img", {
className: "gd2-cover",
src: n
}), c.default.createElement("div", {
className: "gd2-info"
}, this.renderButton(p, _), c.default.createElement("div", {
className: "gd2-cont"
}, c.default.createElement("div", {
className: "gd2-cont-name"
}, i), c.default.createElement("div", {
className: "gd2-cont-text"
}, o, " ", o ? c.default.createElement("span", {
className: "gd2-cont-split"
}) : "", r)))) : null;
}
}, {
key: "subscribe",
value: function() {
e.eventList[this.appad.id] = this.handler.bind(this), ToutiaoJSBridge.call("subscribe_app_ad", {
data: this.state.appad
});
}
}, {
key: "unsubscribe",
value: function() {
delete e.eventList[this.appad.id], ToutiaoJSBridge.call("unsubscribe_app_ad", {
data: this.appad
});
}
}, {
key: "handler",
value: function(t) {
t.current_bytes = t.current_bytes >= 0 ? t.current_bytes : 0;
var e = t.current_bytes / t.total_bytes;
e = isNaN(e) ? 0 : Math.floor(100 * e), "download_failed" === t.status && ToutiaoJSBridge.call("toast", {
text: "应用下载失败"
}), this.setState({
status: t.status,
progress: e
});
}
}, {
key: "log",
value: function(t) {
send_umeng_event(this.appad.tag, t, this.statisticsData);
}
}, {
key: "handleButton",
value: function(t) {
1 == this.state.installed ? (t.stopPropagation(), t.preventDefault(), this.log("click_open"), 
ToutiaoJSBridge.call("openThirdApp", {
pkg_name: this.props.pkg_name
}, function(t) {
0 == t.code && ToutiaoJSBridge.call("toast", {
text: "打开应用失败，请稍后尝试"
});
})) : client.isAndroid && this.hasDownloader() ? (t.stopPropagation(), t.preventDefault(), 
ToutiaoJSBridge.call("download_app_ad", {
data: this.appad
})) : client.isAndroid && (t.stopPropagation(), t.preventDefault(), location.href = this.appad.download_url_for_android, 
this.log("click_download"));
}
}, {
key: "componentDidMount",
value: function() {
var t = n(this.props, []);
t.type = "app", t.source = "pgc", t.tag = "article_card_app_ad", t.item_id = Page.statistics.item_id, 
t.media_id = Page.author.mediaId, t.log_extra = '{"rit":3,"item_id":0,"convert_id":0}', 
client.isIOS && t.download_url_for_ios ? t.detail = t.download_url_for_ios : client.isAndroid && t.download_url_for_android && (t.detail = t.detail ? "sslocal://webview?url=" + encodeURIComponent(t.detail) : t.download_url_for_android, 
t.download_url = t.download_url_for_android), t.download_url = t.download_url_for_android, 
this.appad = t, this.hasDownloader() && this.subscribe(), this.isInstalled(), e.startListen || (ToutiaoJSBridge.on("app_ad_event", function(t) {
t = t || {};
var a = t.appad || {}, n = a.id;
e.eventList[n](t);
}), e.startListen = !0), this.statisticsData = {
value: Page.statistics.item_id,
extra: {
card_type: t.card_type,
app_name: encodeURIComponent(t.name),
pkg_name: t.pkg_name,
app_id: t.app_id,
app_category: encodeURIComponent(t.game_type),
media_id: Page.author.mediaId,
item_id: Page.statistics.item_id
}
}, this.log("show"), ToutiaoJSBridge.call("subscribe_app_ad", {
data: this.appad
});
}
}, {
key: "componentWillUnmount",
value: function() {
ToutiaoJSBridge.call("unsubscribe_app_ad", {
data: this.appad
}), e.eventList = null;
}
} ]), e;
}(l.Component);
d.defaultProps = {
card_type: 0,
card_id: 0,
type: "game",
logo: "http://p3.pstatp.com/large/22d30005ec3a6f01ff6a",
banner: "http://p3.pstatp.com/large/22d30005ec3a6f01ff6a",
name: "游戏",
game_type: "游戏类型",
size: "0",
desc: "游戏描述",
detail: "",
pkg_name: "",
download_url_for_android: "",
download_url_for_ios: ""
}, d.startListen = !1, d.eventList = {}, e.default = d;
}, function(t, e, a) {
"use strict";
function n(t) {
return t && t.__esModule ? t : {
"default": t
};
}
Object.defineProperty(e, "__esModule", {
value: !0
});
var i = a(5), o = n(i), r = a(6), s = n(r), l = a(8), c = n(l), d = a(10), u = n(d), _ = a(9), p = n(_);
e.default = {
Audio: o.default,
Game: s.default,
Novel: c.default,
Temai: u.default,
PhoneGroup: p.default
};
}, function(t, e, a) {
"use strict";
function n(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
}
function i(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e;
}
function o(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
}
Object.defineProperty(e, "__esModule", {
value: !0
});
var r = function() {
function t(t, e) {
for (var a = 0; a < e.length; a++) {
var n = e[a];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), 
Object.defineProperty(t, n.key, n);
}
}
return function(e, a, n) {
return a && t(e.prototype, a), n && t(e, n), e;
};
}(), s = a(0), l = function(t) {
return t && t.__esModule ? t : {
"default": t
};
}(s);
a(1);
var c = function(t) {
function e() {
return n(this, e), i(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments));
}
return o(e, t), r(e, [ {
key: "render",
value: function() {
var t = this.props, e = t.thumb_url, a = t.book_name, n = t.schema_url, i = t.abstract, o = t.author, r = t.category;
return l.default.createElement("div", {
className: "novel-card"
}, l.default.createElement("a", {
href: n,
target: "_blank",
className: "novel-card-link"
}, l.default.createElement("div", {
className: "novel-card-cover"
}, l.default.createElement("img", {
className: "movie-image",
src: e,
alt: a
})), l.default.createElement("div", {
className: "novel-card-content"
}, l.default.createElement("p", {
className: "novel-card-title"
}, a), l.default.createElement("p", {
className: "novel-card-abstract"
}, i), l.default.createElement("div", {
className: "novel-card-detail"
}, l.default.createElement("span", {
className: "novel-card-detail-item novel-card-author"
}, o), l.default.createElement("span", {
className: "novel-card-detail-item novel-card-category"
}, r), l.default.createElement("i", {
className: "novel-card-icon"
}), l.default.createElement("span", {
className: "novel-card-more"
}, "查看更多")))));
}
} ]), e;
}(s.Component);
e.default = c;
}, function(t, e, a) {
"use strict";
function n(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
}
function i(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e;
}
function o(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
}
Object.defineProperty(e, "__esModule", {
value: !0
});
var r = function() {
function t(t, e) {
for (var a = 0; a < e.length; a++) {
var n = e[a];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), 
Object.defineProperty(t, n.key, n);
}
}
return function(e, a, n) {
return a && t(e.prototype, a), n && t(e, n), e;
};
}(), s = a(0), l = function(t) {
return t && t.__esModule ? t : {
"default": t
};
}(s);
a(1);
var c = function(t) {
function e() {
return n(this, e), i(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments));
}
return o(e, t), r(e, [ {
key: "render",
value: function() {
var t = this, e = this.props["contact-phone"], a = this.props["contact-name"], n = this.props["book-url"], i = this.props["book-name"], o = 0, r = 0, s = 0;
return a && e && (o++, r = 1), n && i && (o++, s = 1), l.default.createElement("div", {
className: "cpg-container",
"button-count": o
}, r ? l.default.createElement("a", {
className: "cpg-button cpg-call",
onClick: function() {
return t.log("call", e);
},
href: "tel:" + e
}, a) : null, s ? l.default.createElement("a", {
className: "cpg-button cpg-link",
onClick: function() {
return t.log("url", n);
},
href: "sslocal://webview?url=" + encodeURIComponent(n)
}, i) : null);
}
}, {
key: "log",
value: function(t, e, a) {
a = a || "click", send_umeng_event("embeded_button_ad", a, {
value: Page.statistics.item_id,
extra: {
action_type: t,
button_value: e,
action_time: new Date().getTime()
}
});
}
}, {
key: "componentDidMount",
value: function() {
var t = this.props["contact-phone"], e = this.props["contact-name"], a = this.props["book-url"], n = this.props["book-name"];
t && e && this.log("call", t, "show"), a && n && this.log("url", a, "show");
}
} ]), e;
}(s.Component);
e.default = c;
}, function(t, e, a) {
"use strict";
function n(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
}
function i(t, e) {
if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e;
}
function o(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
}
Object.defineProperty(e, "__esModule", {
value: !0
});
var r = function() {
function t(t, e) {
for (var a = 0; a < e.length; a++) {
var n = e[a];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), 
Object.defineProperty(t, n.key, n);
}
}
return function(e, a, n) {
return a && t(e.prototype, a), n && t(e, n), e;
};
}(), s = a(0), l = function(t) {
return t && t.__esModule ? t : {
"default": t
};
}(s);
a(1);
var c = function(t) {
function e() {
return n(this, e), i(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments));
}
return o(e, t), r(e, [ {
key: "render",
value: function() {
var t = this.props, e = t.charge_url, a = (t.commodity_id, t.img_url), n = t.price, i = (t.slave_commodity_id, 
t.source), o = t.title;
return l.default.createElement("div", {
className: "pgc-commodity"
}, l.default.createElement("a", {
className: "pgc-commodity-link",
href: e
}, l.default.createElement("div", {
className: "pgc-commodity-box"
}, l.default.createElement("div", {
className: "pgc-commodity-img-box"
}, l.default.createElement("div", {
className: "pgc-commodity-img-square"
}, l.default.createElement("img", {
src: a,
alt: "特卖"
}))), l.default.createElement("div", {
className: "pgc-commodity-info"
}, l.default.createElement("h3", {
className: "pgc-commodity-title"
}, o), l.default.createElement("div", {
className: "pgc-commodity-bar"
}, l.default.createElement("span", {
className: "pgc-commodity-price"
}, "￥", n), l.default.createElement("span", {
className: "pgc-commodity-from"
}, i), l.default.createElement("span", {
className: "pgc-commodity-buy"
}, "购买"))))));
}
} ]), e;
}(s.Component);
e.default = c;
}, function(t, e, a) {
"use strict";
function n(t) {
return t && t.__esModule ? t : {
"default": t
};
}
function i(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
}
Object.defineProperty(e, "__esModule", {
value: !0
});
var o = function() {
function t(t, e) {
for (var a = 0; a < e.length; a++) {
var n = e[a];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), 
Object.defineProperty(t, n.key, n);
}
}
return function(e, a, n) {
return a && t(e.prototype, a), n && t(e, n), e;
};
}(), r = a(0), s = n(r), l = a(0), c = n(l), d = a(2), u = n(d), _ = a(7), p = n(_), f = {}, h = function() {
function t() {
i(this, t);
}
return o(t, [ {
key: "init",
value: function(t) {
return this.config = t, this;
}
}, {
key: "registerCard",
value: function(t) {
return f[t.tag] = t.component, this;
}
}, {
key: "getComponentByTag",
value: function(t) {
return t = t.toLowerCase(), f[t];
}
}, {
key: "isCard",
value: function(t) {
return void 0 !== f[t];
}
}, {
key: "checkCardTag",
value: function(t) {
return t && t.nodeName ? this.config.match.test(t.nodeName) : !1;
}
}, {
key: "resolveTagToComponent",
value: function(t) {
if (t) {
var e = t.toLowerCase().split("-");
e.length > 1 && e.shift();
for (var a = "", n = 0, i = e.length; i > n; n++) a += u.default.firstUpper(e[n]);
return a;
}
}
}, {
key: "render",
value: function(t) {
var e = this, n = void 0;
u.default.map(t, function(t) {
if (e.checkCardTag(t)) if (e.getComponentByTag(t.nodeName)) n = c.default.createElement(e.getComponentByTag(t.nodeName), u.default.buildAttrs(t)), 
s.default.render(n, t); else {
var i = e.resolveTagToComponent(t.nodeName);
a.e(0).then(a.bind(null, 21)).then(function(e) {
var a = e.default;
"pre" == t.nodeName.toLowerCase() && (i = "Code"), n = c.default.createElement(a[i], u.default.buildAttrs(t), t.textContent), 
s.default.render(n, t);
});
}
});
}
}, {
key: "componentWillUnmount",
value: function() {
this.config = null;
}
} ], [ {
key: "getInstance",
value: function() {
return t.instance || (t.instance = new t()), t.instance;
}
} ]), t;
}(), m = h.getInstance();
m.registerCard({
tag: "tt-audio",
component: p.default.Audio
}), m.registerCard({
tag: "tt-game",
component: p.default.Game
}), m.registerCard({
tag: "tt-novel",
component: p.default.Novel
}), m.registerCard({
tag: "tt-temai",
component: p.default.Temai
}), m.registerCard({
tag: "tt-phone-group",
component: p.default.PhoneGroup
}), e.default = m;
}, function(t) {
"use strict";
function e(t) {
return function() {
return t;
};
}
var a = function() {};
a.thatReturns = e, a.thatReturnsFalse = e(!1), a.thatReturnsTrue = e(!0), a.thatReturnsNull = e(null), 
a.thatReturnsThis = function() {
return this;
}, a.thatReturnsArgument = function(t) {
return t;
}, t.exports = a;
}, function(t) {
"use strict";
function e(t, e, n, i, o, r, s, l) {
if (a(e), !t) {
var c;
if (void 0 === e) c = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."); else {
var d = [ n, i, o, r, s, l ], u = 0;
c = new Error(e.replace(/%s/g, function() {
return d[u++];
})), c.name = "Invariant Violation";
}
throw c.framesToPop = 1, c;
}
}
var a = function() {};
t.exports = e;
}, function(t, e) {
var a, n, i;
!function(o, r) {
n = [ e, t ], a = r, void 0 !== (i = "function" == typeof a ? a.apply(e, n) : a) && (t.exports = i);
}(0, function(t, e) {
"use strict";
function a() {
return "jsonp_" + Date.now() + "_" + Math.ceil(1e5 * Math.random());
}
function n(t) {
try {
delete window[t];
} catch (e) {
window[t] = void 0;
}
}
function i(t) {
var e = document.getElementById(t);
e && document.getElementsByTagName("head")[0].removeChild(e);
}
function o(t) {
var e = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1], o = t, s = e.timeout || r.timeout, l = e.jsonpCallback || r.jsonpCallback, c = void 0;
return new Promise(function(r, d) {
var u = e.jsonpCallbackFunction || a(), _ = l + "_" + u;
window[u] = function(t) {
r({
ok: !0,
json: function() {
return Promise.resolve(t);
}
}), c && clearTimeout(c), i(_), n(u);
}, o += -1 === o.indexOf("?") ? "?" : "&";
var p = document.createElement("script");
p.setAttribute("src", "" + o + l + "=" + u), e.charset && p.setAttribute("charset", e.charset), 
p.id = _, document.getElementsByTagName("head")[0].appendChild(p), c = setTimeout(function() {
d(new Error("JSONP request to " + t + " timed out")), n(u), i(_);
}, s), p.onerror = function() {
d(new Error("JSONP request to " + t + " failed")), n(u), i(_), c && clearTimeout(c);
};
});
}
var r = {
timeout: 5e3,
jsonpCallback: "callback",
jsonpCallbackFunction: null
};
e.exports = o;
});
}, function(t) {
!function() {
"use strict";
function e() {}
function a(t, a) {
var n, i, o, r, s = O;
for (r = arguments.length; r-- > 2; ) N.push(arguments[r]);
for (a && null != a.children && (N.length || N.push(a.children), delete a.children); N.length; ) if ((i = N.pop()) && void 0 !== i.pop) for (r = i.length; r--; ) N.push(i[r]); else !0 !== i && !1 !== i || (i = null), 
(o = "function" != typeof t) && (null == i ? i = "" : "number" == typeof i ? i = String(i) : "string" != typeof i && (o = !1)), 
o && n ? s[s.length - 1] += i : s === O ? s = [ i ] : s.push(i), n = o;
var l = new e();
return l.nodeName = t, l.children = s, l.attributes = null == a ? void 0 : a, l.key = null == a ? void 0 : a.key, 
void 0 !== E.vnode && E.vnode(l), l;
}
function n(t, e) {
for (var a in e) t[a] = e[a];
return t;
}
function i(t, e) {
return a(t.nodeName, n(n({}, t.attributes), e), arguments.length > 2 ? [].slice.call(arguments, 2) : t.children);
}
function o(t) {
!t.__d && (t.__d = !0) && 1 == j.push(t) && (E.debounceRendering || setTimeout)(r);
}
function r() {
var t, e = j;
for (j = []; t = e.pop(); ) t.__d && T(t);
}
function s(t, e, a) {
return "string" == typeof e || "number" == typeof e ? void 0 !== t.splitText : "string" == typeof e.nodeName ? !t._componentConstructor && l(t, e.nodeName) : a || t._componentConstructor === e.nodeName;
}
function l(t, e) {
return t.__n === e || t.nodeName.toLowerCase() === e.toLowerCase();
}
function c(t) {
var e = n({}, t.attributes);
e.children = t.children;
var a = t.nodeName.defaultProps;
if (void 0 !== a) for (var i in a) void 0 === e[i] && (e[i] = a[i]);
return e;
}
function d(t, e) {
var a = e ? document.createElementNS("http://www.w3.org/2000/svg", t) : document.createElement(t);
return a.__n = t, a;
}
function u(t) {
t.parentNode && t.parentNode.removeChild(t);
}
function _(t, e, a, n, i) {
if ("className" === e && (e = "class"), "key" === e) ; else if ("ref" === e) a && a(null), 
n && n(t); else if ("class" !== e || i) if ("style" === e) {
if (n && "string" != typeof n && "string" != typeof a || (t.style.cssText = n || ""), 
n && "object" == typeof n) {
if ("string" != typeof a) for (var o in a) o in n || (t.style[o] = "");
for (var o in n) t.style[o] = "number" == typeof n[o] && !1 === L.test(o) ? n[o] + "px" : n[o];
}
} else if ("dangerouslySetInnerHTML" === e) n && (t.innerHTML = n.__html || ""); else if ("o" == e[0] && "n" == e[1]) {
var r = e !== (e = e.replace(/Capture$/, ""));
e = e.toLowerCase().substring(2), n ? a || t.addEventListener(e, f, r) : t.removeEventListener(e, f, r), 
(t.__l || (t.__l = {}))[e] = n;
} else if ("list" !== e && "type" !== e && !i && e in t) p(t, e, null == n ? "" : n), 
null != n && !1 !== n || t.removeAttribute(e); else {
var s = i && e !== (e = e.replace(/^xlink\:?/, ""));
null == n || !1 === n ? s ? t.removeAttributeNS("http://www.w3.org/1999/xlink", e.toLowerCase()) : t.removeAttribute(e) : "function" != typeof n && (s ? t.setAttributeNS("http://www.w3.org/1999/xlink", e.toLowerCase(), n) : t.setAttribute(e, n));
} else t.className = n || "";
}
function p(t, e, a) {
try {
t[e] = a;
} catch (t) {}
}
function f(t) {
return this.__l[t.type](E.event && E.event(t) || t);
}
function h() {
for (var t; t = M.pop(); ) E.afterMount && E.afterMount(t), t.componentDidMount && t.componentDidMount();
}
function m(t, e, a, n, i, o) {
U++ || (D = null != i && void 0 !== i.ownerSVGElement, B = null != t && !("__preactattr_" in t));
var r = g(t, e, a, n, o);
return i && r.parentNode !== i && i.appendChild(r), --U || (B = !1, o || h()), r;
}
function g(t, e, a, n, i) {
var o = t, r = D;
if (null == e && (e = ""), "string" == typeof e) return t && void 0 !== t.splitText && t.parentNode && (!t._component || i) ? t.nodeValue != e && (t.nodeValue = e) : (o = document.createTextNode(e), 
t && (t.parentNode && t.parentNode.replaceChild(o, t), b(t, !0))), o.__preactattr_ = !0, 
o;
if ("function" == typeof e.nodeName) return C(t, e, a, n);
if (D = "svg" === e.nodeName || "foreignObject" !== e.nodeName && D, (!t || !l(t, String(e.nodeName))) && (o = d(String(e.nodeName), D), 
t)) {
for (;t.firstChild; ) o.appendChild(t.firstChild);
t.parentNode && t.parentNode.replaceChild(o, t), b(t, !0);
}
var s = o.firstChild, c = o.__preactattr_ || (o.__preactattr_ = {}), u = e.children;
return !B && u && 1 === u.length && "string" == typeof u[0] && null != s && void 0 !== s.splitText && null == s.nextSibling ? s.nodeValue != u[0] && (s.nodeValue = u[0]) : (u && u.length || null != s) && v(o, u, a, n, B || null != c.dangerouslySetInnerHTML), 
w(o, e.attributes, c), D = r, o;
}
function v(t, e, a, n, i) {
var o, r, l, c, d = t.childNodes, _ = [], p = {}, f = 0, h = 0, m = d.length, v = 0, y = e ? e.length : 0;
if (0 !== m) for (var w = 0; m > w; w++) {
var x = d[w], k = x.__preactattr_, S = y && k ? x._component ? x._component.__k : k.key : null;
null != S ? (f++, p[S] = x) : (k || (void 0 !== x.splitText ? !i || x.nodeValue.trim() : i)) && (_[v++] = x);
}
if (0 !== y) for (var w = 0; y > w; w++) {
l = e[w], c = null;
var S = l.key;
if (null != S) f && void 0 !== p[S] && (c = p[S], p[S] = void 0, f--); else if (!c && v > h) for (o = h; v > o; o++) if (void 0 !== _[o] && s(r = _[o], l, i)) {
c = r, _[o] = void 0, o === v - 1 && v--, o === h && h++;
break;
}
c = g(c, l, a, n), c && c !== t && (w >= m ? t.appendChild(c) : c !== d[w] && (c === d[w + 1] ? u(d[w]) : t.insertBefore(c, d[w] || null)));
}
if (f) for (var w in p) void 0 !== p[w] && b(p[w], !1);
for (;v >= h; ) void 0 !== (c = _[v--]) && b(c, !1);
}
function b(t, e) {
var a = t._component;
a ? A(a) : (null != t.__preactattr_ && t.__preactattr_.ref && t.__preactattr_.ref(null), 
!1 !== e && null != t.__preactattr_ || u(t), y(t));
}
function y(t) {
for (t = t.lastChild; t; ) {
var e = t.previousSibling;
b(t, !0), t = e;
}
}
function w(t, e, a) {
var n;
for (n in a) e && null != e[n] || null == a[n] || _(t, n, a[n], a[n] = void 0, D);
for (n in e) "children" === n || "innerHTML" === n || n in a && e[n] === ("value" === n || "checked" === n ? t[n] : a[n]) || _(t, n, a[n], a[n] = e[n], D);
}
function x(t) {
var e = t.constructor.name;
(z[e] || (z[e] = [])).push(t);
}
function k(t, e, a) {
var n, i = z[t.name];
if (t.prototype && t.prototype.render ? (n = new t(e, a), I.call(n, e, a)) : (n = new I(e, a), 
n.constructor = t, n.render = S), i) for (var o = i.length; o--; ) if (i[o].constructor === t) {
n.__b = i[o].__b, i.splice(o, 1);
break;
}
return n;
}
function S(t, e, a) {
return this.constructor(t, a);
}
function P(t, e, a, n, i) {
t.__x || (t.__x = !0, (t.__r = e.ref) && delete e.ref, (t.__k = e.key) && delete e.key, 
!t.base || i ? t.componentWillMount && t.componentWillMount() : t.componentWillReceiveProps && t.componentWillReceiveProps(e, n), 
n && n !== t.context && (t.__c || (t.__c = t.context), t.context = n), t.__p || (t.__p = t.props), 
t.props = e, t.__x = !1, 0 !== a && (1 !== a && !1 === E.syncComponentUpdates && t.base ? o(t) : T(t, 1, i)), 
t.__r && t.__r(t));
}
function T(t, e, a, i) {
if (!t.__x) {
var o, r, s, l = t.props, d = t.state, u = t.context, _ = t.__p || l, p = t.__s || d, f = t.__c || u, g = t.base, v = t.__b, y = g || v, w = t._component, x = !1;
if (g && (t.props = _, t.state = p, t.context = f, 2 !== e && t.shouldComponentUpdate && !1 === t.shouldComponentUpdate(l, d, u) ? x = !0 : t.componentWillUpdate && t.componentWillUpdate(l, d, u), 
t.props = l, t.state = d, t.context = u), t.__p = t.__s = t.__c = t.__b = null, 
t.__d = !1, !x) {
o = t.render(l, d, u), t.getChildContext && (u = n(n({}, u), t.getChildContext()));
var S, C, I = o && o.nodeName;
if ("function" == typeof I) {
var $ = c(o);
r = w, r && r.constructor === I && $.key == r.__k ? P(r, $, 1, u, !1) : (S = r, 
t._component = r = k(I, $, u), r.__b = r.__b || v, r.__u = t, P(r, $, 0, u, !1), 
T(r, 1, a, !0)), C = r.base;
} else s = y, S = w, S && (s = t._component = null), (y || 1 === e) && (s && (s._component = null), 
C = m(s, o, u, a || !g, y && y.parentNode, !0));
if (y && C !== y && r !== w) {
var N = y.parentNode;
N && C !== N && (N.replaceChild(C, y), S || (y._component = null, b(y, !1)));
}
if (S && A(S), t.base = C, C && !i) {
for (var O = t, L = t; L = L.__u; ) (O = L).base = C;
C._component = O, C._componentConstructor = O.constructor;
}
}
if (!g || a ? M.unshift(t) : x || (h(), t.componentDidUpdate && t.componentDidUpdate(_, p, f), 
E.afterUpdate && E.afterUpdate(t)), null != t.__h) for (;t.__h.length; ) t.__h.pop().call(t);
U || i || h();
}
}
function C(t, e, a, n) {
for (var i = t && t._component, o = i, r = t, s = i && t._componentConstructor === e.nodeName, l = s, d = c(e); i && !l && (i = i.__u); ) l = i.constructor === e.nodeName;
return i && l && (!n || i._component) ? (P(i, d, 3, a, n), t = i.base) : (o && !s && (A(o), 
t = r = null), i = k(e.nodeName, d, a), t && !i.__b && (i.__b = t, r = null), P(i, d, 1, a, n), 
t = i.base, r && t !== r && (r._component = null, b(r, !1))), t;
}
function A(t) {
E.beforeUnmount && E.beforeUnmount(t);
var e = t.base;
t.__x = !0, t.componentWillUnmount && t.componentWillUnmount(), t.base = null;
var a = t._component;
a ? A(a) : e && (e.__preactattr_ && e.__preactattr_.ref && e.__preactattr_.ref(null), 
t.__b = e, u(e), x(t), y(e)), t.__r && t.__r(null);
}
function I(t, e) {
this.__d = !0, this.context = e, this.props = t, this.state = this.state || {};
}
function $(t, e, a) {
return m(a, t, {}, !1, e, !1);
}
var E = {}, N = [], O = [], L = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i, j = [], M = [], U = 0, D = !1, B = !1, z = {};
n(I.prototype, {
setState: function(t, e) {
var a = this.state;
this.__s || (this.__s = n({}, a)), n(a, "function" == typeof t ? t(a, this.props) : t), 
e && (this.__h = this.__h || []).push(e), o(this);
},
forceUpdate: function(t) {
t && (this.__h = this.__h || []).push(t), T(this, 2);
},
render: function() {}
});
var R = {
h: a,
createElement: a,
cloneElement: i,
Component: I,
render: $,
rerender: r,
options: E
};
t.exports = R;
}();
}, function(t) {
function e() {
throw new Error("setTimeout has not been defined");
}
function a() {
throw new Error("clearTimeout has not been defined");
}
function n(t) {
if (c === setTimeout) return setTimeout(t, 0);
if ((c === e || !c) && setTimeout) return c = setTimeout, setTimeout(t, 0);
try {
return c(t, 0);
} catch (a) {
try {
return c.call(null, t, 0);
} catch (a) {
return c.call(this, t, 0);
}
}
}
function i(t) {
if (d === clearTimeout) return clearTimeout(t);
if ((d === a || !d) && clearTimeout) return d = clearTimeout, clearTimeout(t);
try {
return d(t);
} catch (e) {
try {
return d.call(null, t);
} catch (e) {
return d.call(this, t);
}
}
}
function o() {
f && _ && (f = !1, _.length ? p = _.concat(p) : h = -1, p.length && r());
}
function r() {
if (!f) {
var t = n(o);
f = !0;
for (var e = p.length; e; ) {
for (_ = p, p = []; ++h < e; ) _ && _[h].run();
h = -1, e = p.length;
}
_ = null, f = !1, i(t);
}
}
function s(t, e) {
this.fun = t, this.array = e;
}
function l() {}
var c, d, u = t.exports = {};
!function() {
try {
c = "function" == typeof setTimeout ? setTimeout : e;
} catch (t) {
c = e;
}
try {
d = "function" == typeof clearTimeout ? clearTimeout : a;
} catch (t) {
d = a;
}
}();
var _, p = [], f = !1, h = -1;
u.nextTick = function(t) {
var e = new Array(arguments.length - 1);
if (arguments.length > 1) for (var a = 1; a < arguments.length; a++) e[a - 1] = arguments[a];
p.push(new s(t, e)), 1 !== p.length || f || n(r);
}, s.prototype.run = function() {
this.fun.apply(null, this.array);
}, u.title = "browser", u.browser = !0, u.env = {}, u.argv = [], u.version = "", 
u.versions = {}, u.on = l, u.addListener = l, u.once = l, u.off = l, u.removeListener = l, 
u.removeAllListeners = l, u.emit = l, u.prependListener = l, u.prependOnceListener = l, 
u.listeners = function() {
return [];
}, u.binding = function() {
throw new Error("process.binding is not supported");
}, u.cwd = function() {
return "/";
}, u.chdir = function() {
throw new Error("process.chdir is not supported");
}, u.umask = function() {
return 0;
};
}, function(t, e, a) {
"use strict";
var n = a(12), i = a(13), o = a(19);
t.exports = function() {
function t(t, e, a, n, r, s) {
s !== o && i(!1, "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
}
function e() {
return t;
}
t.isRequired = t;
var a = {
array: t,
bool: t,
func: t,
number: t,
object: t,
string: t,
symbol: t,
any: t,
arrayOf: e,
element: t,
instanceOf: e,
node: t,
objectOf: e,
oneOf: e,
oneOfType: e,
shape: e
};
return a.checkPropTypes = n, a.PropTypes = a, a;
};
}, function(t, e, a) {
t.exports = a(17)();
}, function(t) {
"use strict";
t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
}, function(t, e, a) {
t.exports = a(3);
} ]);